-
Notifications
You must be signed in to change notification settings - Fork 28.6k
Flutter is developed in modules, and each module can run independently #147847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think it would be helpful to explain when and how to use this by providing a use case. Imo, one of the tricky things about Flutter modules is that when your UI has multiple parts and you're using bloc or provider, each part ends up doing the same thing. So, if you update one part, it could mess up the whole project because you can't rely on two different versions of the same package |
What's more intersseting is how to deal with assets in this case is it possible to pass them up and down between modules ? |
Can it be understood that these modules are currently just plugins and not real modules? |
It is a real module and can be started independently, similar to Android native sub-module development. |
Tbh he is right what we have here is a mix between the two kinda modules shaped inside a plugin |
See the project size in ur disk |
I thought it was the packaging size. This shouldn’t be a problem. Most developers’ productivity tools have enough capacity. |
Now there is only one problem left, how to solve the problem of access of local resources between various modules |
Removing |
@LanSeLianMa |
As long as it is added in the common module, other modules can access it, but the compiler will not prompt you. You need to import the package manually. However, when importing the package, the compiler will prompt you. |
@LanSeLianMa |
@LanSeLianMa Can you elaborate when you say to formally apply in actual projects ? Are you proposing to add this as an option in the sdk itself ? By the looks of it and your findings so far, it seems there are lot of open end cases that you'll need to cover, consider and test before presenting the idea. Also, check if this resembles your case or not. |
No need to add it to the SDK, I just want to ask if this development method is feasible |
In fact, it is just to make the project structure clearer. The remaining problem is how to access local files across modules. |
@LanSeLianMa |
Okay, do you have any recommendations for relevant platforms? |
Communities with more active official attention can also be used |
@LanSeLianMa |
I choose Twitter |
This channel https://twitter.com/r_FlutterDev |
Closing from here as you can track and follow-up in other platforms to get feedback your on idea. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Document Link
https://github.com/LanSeLianMa/flutter_module_develop
What problem are you solving?
I implemented module development by using Flutter's named routing method, and each module can run independently. My demo includes Provider.
Step illustration:
I will omit showing other module creation processes here because they are all the same.

4.1 common module adds dependencies

4.2 home, order, personal modules pubspec.yaml dependencies common module

4.3 the app module depends on the home, order, and personal modules

demo link
https://github.com/LanSeLianMa/flutter_module_develop
I would like to ask if this Flutter development method can be formally applied in actual projects?
The text was updated successfully, but these errors were encountered: