Domains: Flutter


It’s sometimes not practical to rewrite your entire application in Flutter all at once. For those situations, Flutter can be integrated into your existing application piecemeal, as a library or module. That module can then be imported into your Android or iOS (currently supported platforms) app to render a part of your app’s UI in Flutter. Or, just to run shared Dart logic.

In a few steps, you can bring the productivity and the expressiveness of Flutter into your own app.

As of Flutter v1.12, add-to-app is supported for the basic scenario of integrating one full-screen Flutter instance at a time per app. It currently has the following limitations:

  • Running multiple Flutter instances or running in partial screen views may have undefined behavior.
  • Using Flutter in background mode is still a WIP.
  • Packing a Flutter library into another sharable library or packing multiple Flutter libraries into an application isn’t supported.
  • Plugins used in add-to-app on Android should undergo and use the FlutterPlugin-based APIs. Plugins that don’t support FlutterPlugin may have unexpected behaviors if they make assumptions that are untenable in add-to-app (such as assuming that a Flutter Activity is always present).

Supported features

Add to Android applications

Add to iOS applications

  • Auto-build and import the Flutter module by adding a Flutter SDK hook to your CocoaPods and to your Xcode build phase.
  • Build your Flutter module into a generic iOS Framework for integration into your own build system.
  • FlutterEngine API for starting and persisting your Flutter environment independently of attaching a FlutterViewController.
  • Objective-C and Swift host apps supported.
  • Flutter modules can use Flutter plugins to interact with the platform.
  • Support for Flutter debugging and stateful hot reload by using flutter attach from IDEs or the command line to connect to an app that contains Flutter.

See our add-to-app GitHub Samples repository for sample projects in Android and iOS that import a Flutter module for UI.

Similar pages

Page structure