Questions tagged [flutter-add-to-app]

For questions relating to adding flutter to existing iOS or Android apps. Use this tag in combination with the general [flutter] tag. If your question applies to Flutter more generally, use the [flutter] tag only.

Flutter provides methods of integrating Flutter with an existing app when it's not practical to completely rewrite the app in Flutter. The process of doing this is documented here.

34 questions
7
votes
2 answers

Requested flutter engine does not exist in Add to app

I have flutter into the existing native app (Add to app) with a cached flutter engine. override fun onCreate(savedInstanceState: Bundle?) { Log.d(TAG, "onCreate") super.onCreate(savedInstanceState) …
Rahul Devanavar
  • 3,917
  • 4
  • 32
  • 61
5
votes
0 answers

Flutter engine Destroy issue

I have added flutter into the existing android app.using prewarm flutter engine. var flutterEngine = FlutterEngineCache.getInstance().get(Constants.FLUTTER_ENGINE) if (flutterEngine == null) { flutterEngine =…
Rahul Devanavar
  • 3,917
  • 4
  • 32
  • 61
4
votes
3 answers

Why webview_flutter not working in case of add to app (iOS)?

So I am trying to open a simple webview when a button is clicked. This is the body of my Scaffold widget: body: WebView( initialUrl: "https://www.google.com/", javascriptMode: JavascriptMode.unrestricted, ) The interesting part is when I…
Let's_Create
  • 2,963
  • 3
  • 14
  • 33
4
votes
2 answers

How to make Flutter module return to native Android activity after the native Android activity launches a secondary route?

I'm adding flutter to a existing Android project and everything is working fine, except one thing: My Android project has only one Flutter module. In that Flutter module I have two routes that will be shown in different parts of the Android…
Pedro Massango
  • 4,114
  • 2
  • 28
  • 48
3
votes
0 answers

FlutterEngine navigationChannel setInitialRoute not working

I am trying to integrate a flutter module in my iOS native app and would like to open different routes based on the option user selects on home screen. As per the Flutter documentation , one can invoke initial route on flutter engines navigation…
3
votes
2 answers

Unable to get Flutter Add to App working with plugins

I have a Flutter module and I'm trying to add it to my native Android app. I have tried both the AAR approach and the source code approach. When I try building the AAR, I run the flutter build aar command. I get a long output, but this seems to be…
Mark
  • 1,130
  • 3
  • 17
  • 32
3
votes
2 answers

How to get setInitialRoute to start my Flutter iOS app on different views?

In flutter I have this: void main() => runApp(new MyApp()); class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return new MaterialApp( title: 'Flutter…
Michael Wildermuth
  • 5,762
  • 3
  • 29
  • 48
2
votes
1 answer

How to handle asynchronous error in 'Add to App' Flutter android application

I am trying to use runZonedGuarded for the handling of asynchronous error in my Add to App project, but its never goes under the error handling when debugging, only showing as an unhandled exception in logs. Future main() async…
2
votes
0 answers

Can I use native app resources files inside a flutter module added to native app?

I have a native android app where some of my views are Flutter views added to my native app through Flutter add-to-app feature. In my native app I have a plethora of dimensions, colors and strings defined on xml resource files which are used by my…
Jorge Xavier
  • 21
  • 1
  • 2
2
votes
0 answers

Flutter add-to-app fragment inserts unnecessary bottom padding when keyboard is open

Short Description Adding a flutter fragment to an existing Android app is adding extra padding at the bottom when the keyboard is displayed. Description If a flutter fragment is imported into an android app & the fragment is not full screen (e.g. a…
DarkMikey
  • 383
  • 1
  • 4
  • 24
2
votes
0 answers

Problem with "add to app": Could not launch engine with configuration

I'm struggling to integrate a Flutter Module into a Swift application. I have followed Flutter documentation (Integrate a Flutter module into your iOS project), and tried all the three options, but unfortunately only the option A (Embed with…
2
votes
0 answers

How to use a flutter module in a flutter app?

I have a flutter module and I want to add it to another existing flutter app. The module is a close-source sdk from a client so it cannot be converted into a package. I know there is the add-to-app functionality but it only works on native apps. Is…
2
votes
0 answers

Android wrapper library of flutter module

According to the docs https://flutter.dev/docs/development/add-to-app/android/plugin-setup#b-plugins-needing-project-edits For advanced users, if more modularity is needed and you must not leak knowledge of your Flutter module’s dependencies into…
Ayush P Gupta
  • 1,459
  • 1
  • 17
  • 24
1
vote
1 answer

Getting `Could not find com.google.firebase:firebase-core:.` error in flutter add-to-app

I'm trying to integrate a Flutter app with the add-to-app feature following the Official documentation which is outdated as per this thread. In my Flutter part's pubspec.yaml, I have this Dependency Library - firebase_core: ^2.4.1 And in my Android…
1
vote
1 answer

How to handle back button on appBar of Scaffold layout in flutter module and navigate to previous page on the host app

I have a question, I have to create a flutter module and integrate it directly into the host app. I want to handle the back button on flutter UI by clicking it and navigating to the previous page on the host app. I use go_router to handle navigation…
1
2 3