Consider using the "Federated plugins" approach #800
Replies: 3 comments 2 replies
-
|
This is really interesting @renancaraujo Initially I saw some packages doing something like this and other not. I thought adding the web code inside the same plugin would be better because then projects only need to import one package and run anywhere. Eg you could run your existing android game on web w/o adding any dependencies. Also the android/ios code lived all in one folder, under the same package. I personally still prefer this structure as I think it's much simpler and cleaner and I fail to see some of the benefits of the article. However, my preference is to follow whatever standard is defined and it seems federated packages is the way to go now. Would you like to help out with this? Seems it would be simple but a lot of work to move everything around and wire correctly. |
Beta Was this translation helpful? Give feedback.
-
|
Yes I could. |
Beta Was this translation helpful? Give feedback.
-
|
How does this look like? #837 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Consider using Federated plugins on audio players.
Full Description
Federated plugins is an approach of maintaining plugins for multiple platforms with a single dart-facing API. This can speed up support for new platforms as requested on #489 and #798.
An advantage of that is that we can see that the approaches to play sound in different platforms can vary a lot from platform to platform, and they may have different levels of stability. This would allow the platform plugins to be updated independently.
An example of a package already doing this is shared_preferences in which we have shared_preferences_linux, shared_preferences_macos, shared_preferences_web and shared_preferences_windows.
There is a guide for migrating here.
Platforms
Beta Was this translation helpful? Give feedback.
All reactions