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.
-
you can use flutter with your native android.docs.flutter.dev/development/add-to-app/android/project-setuplava– lava2022-03-07 10:36:35 +00:00Commented Mar 7, 2022 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– rohit shivankar2022-03-07 10:41:23 +00:00Commented Mar 7, 2022 at 10:41
Add a comment
|
1 Answer
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.