Questions about Flutter - third libs / flavors / import dart lib into native code

1,082 views
Skip to first unread message

cand...@gmail.com

unread,
Mar 5, 2018, 12:43:26 PM3/5/18
to Flutter Dev
Hi,

I have some questions about Flutter, anyone can help me?

Import third-party native libs
Is it possible to import third-party SDKs (.jar / .aar / pod) into my flutter project?

Flavors Resource
Is it possible to generate different applications through the flavor strategy for both Android and iOS, to create white label applications?

Generate Flutter lib and import into native code
Is it possible to create an SDK with Flutter / Dart that is compiled and imported this lib in native Android and iOS native? 
Ex: develop an API SDK in dart, then compile in .jar / .aar and compile to pod, and then import to a native project on Android and another native iOS project.

Thanks,

Eric Seidel

unread,
Mar 8, 2018, 5:44:26 AM3/8/18
to cand...@gmail.com, Flutter Dev
1.  Yes.  Inside the android/ and ios/ directories you will find normal Android Studio/XCode projects.  You can edit to your hearts content.  Flutter plugins use .jars and .pod files already under the hood.

2.  Yes.  `fluter build` supports passing a --flavor argument along to gradle.  You'll have to edit the gradle files in android/ to add your own flavors of course.  If you find that (or other methods) work well for creating white label applications, I'm sure others would be interested in your learnings.  :)

3.  Flutter isn't really designed to be bundled up into framework/library containers in that way.  However you can add a FlutterView to each project and then from the FlutterView import flutter packages or plugins.  Adding a FlutterView to an existing iOS or Android app is possible today, but not particularly smooth or well documented.  We have some bugs on file about improving/documenting that: https://github.com/flutter/flutter/issues/14821

Hope that helps?

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cândido Sales Gomes

unread,
Mar 8, 2018, 12:39:53 PM3/8/18
to Eric Seidel, Flutter Dev
Eric,

Thank your quick reply! :)

To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Cândido Sales Gomes  
(11) 94200-5216 vivo

 
Reply all
Reply to author
Forward
0 new messages