samples icon indicating copy to clipboard operation
samples copied to clipboard

How to add an flutter module (converted into aar) into an existing flutter app?

Open Deepak-GP opened this issue 3 years ago • 1 comments

I understand that we can import the flutter module into a native android app by following the example in prebuilt_module. Is it possible to import an existing flutter module to a flutter app and invoke the flutter module from the app?

I tried setting it up but when I try to invoke the flutter module from the flutter app, the same flutter app instance gets triggered.

The example project and module can be cloned from this repo: [https://github.com/Deepak-GP/flutter-module-import.git]

I know that flutter module can also be imported into the flutter app by directly placing the flutter module path in the pubspec. The reason why I don't want to import the flutter module as a pubspec dependency is that I want import it the flutter module as a separate binary.

Thanks

Deepak-GP avatar Feb 27 '22 07:02 Deepak-GP

Update on the above issue: When I try to build the project in android studio, I get this error: Type io.flutter.plugins.GeneratedPluginRegistrant is defined multiple times

Deepak-GP avatar Mar 03 '22 15:03 Deepak-GP

This question is better suited to Stack Overflow. Issues here are supposed to be about the samples. Thanks!

domesticmouse avatar Sep 18 '23 06:09 domesticmouse