Our current app is written entirely on Flutter, and we need now to create an SDK to incorporate parts of it onto another native IOS and Android apps, liek we have in ZenDesk: https://developer.zendesk.com/embeddables/docs/android/welcome
My questions are:
The SDK will have to display a full screen, make network calls and deal with isolates, I assume this can solve the problem: https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps
Is there a way to create a function that, without any view being displayed on the screen, starts an isolate and holds that data until the screen is shown for the first time?
Is it possible to create Android Views with flutter to be included in an Android Activity? and the same for iOS
I can answer these with regard to Android.
Can I run Dart/Flutter code without a UI on Android?
Yes, there is a new Android embedding in the works (still experimental as of May 2019), which allows you to execute a Dart entrypoint, e.g., main(), without ever attaching a FlutterView.
Can I use a FlutterView instead of a FlutterActivity?
Yes, with the new Android embedding you can integrate Flutter at the View level by using a FlutterView. There is also a FlutterFragment, which gives you most of the benefits of FlutterView, but also forwards a number of important calls that you would otherwise have to do yourself.
Can I package my Flutter code as a library?
Not yet. Currently, Flutter supports direct project linking from a Flutter project to an Android project. However, Flutter does not yet support the creation of an AAR that holds your Android and Flutter code. The Flutter team is working on this. Here is a ticket for tracking: https://github.com/flutter/flutter/issues/26099
At the time of writing this, you can find docs on the new experimental API here: https://github.com/flutter/flutter/wiki/Experimental:-Adding-Flutter-to-Android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With