Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Adopting Flutter in Native Mobile Applications....

Adopting Flutter in Native Mobile Applications. The Boss Revolution Story.

Flutter in Existing Mobile Apps.
The story of Boss Revolution application and how we have migrated from two native codebases to flutter single codebase.
Discuss the challenges in adopting Flutter in existing mobile applications based on real code examples. Challenge the idea of why "Multiple Flutter screens or views" is wrong.
Case Study: - Adopting Flutter and doing A/B Tests between native and Flutter in a published application with more than two million monthly users.

Alexandru Terente

September 25, 2024
Tweet

More Decks by Alexandru Terente

Other Decks in Education

Transcript

  1. Run the iOS App Run in flutter folder: Run in

    iOS folder: Open application .xcodeproj and hit Run
  2. Flutter MethodChannel • Communication between native and Dart/Flutter code •

    Write platform specific code • Use native apis and 3rd party frameworks
  3. Multiple Flutters • https://docs.flutter.dev/add-to-app/multiple-flutters • Flutter documentation has solution for

    multiple flutters • Uses multiple flutter engines • Multiple Modules • The flutter common code can be shared between modules via Flutter Packages
  4. Problems with Multiple Flutters • Loads the system memory and

    CPU with multiple running engines • Multiple calls via MethodChannels to share the same data with different flutter engines • Share state data between Flutter engines has to be done via the native platform
  5. New Problem • The Flutter Engine can have only one

    Activity or ViewController attached at a specific time. • If you have nested native and flutter navigation the FlutterActivity and FlutterViewController will remain stuck when navigating back to it.
  6. A/B Tests We have in place all the pieces of

    the puzzle to do A/B test with a remote config to display either a flutter or a native screen.