I have my native application, which we want to change into flutter. For that, we have decided to build multiple flutter modules and add that to the existing native application. I am not sure whether flutter support building multiple modules in a single native application. Also in the future, as we want to move away from native completely, I didn't find any solution where we can build a fresh flutter application using already developed flutter modules.
Asked
Active
Viewed 1,148 times
1
-
you can use flutter with your native android.https://docs.flutter.dev/development/add-to-app/android/project-setup – lava Mar 07 '22 at 10:36
-
Yeh..I did that for one module..but the query I have is around multiple modules and cross interaction beween different modules and how to build a fresh flutter app with various flutter modules. – rohit shivankar Mar 07 '22 at 10:41
1 Answers
3
It is possible. What you can do is create modules (packages) somewhere in your project, for example, create a directory modules
and place them there.
.
├── modules
│ ├── module1
│ ├── module2
│ ├── module3
│ └── module4
To add them to the current project, in your pubspec.yaml
, you can do the following:
dependencies:
# ...
module1:
path: ./modules/module1
# ... etc for other modules
These local modules are called path dependencies.

sunderee
- 189
- 1
- 11