19min

Flutter

This walkthrough shows you how to add Unflow to your flutter application and display the opener banner.

If you would like a simpler integration path, there is a community built Dart package available. Please not that the Unflow team do not build or maintain this package

Unflow is supported on both iOS and Android, so we'll add it to both of those seperatley, then configure a wrapper in Flutter.

Android

iOS

Displaying content

The SDK includes all the components necessary to integrate Unflow into your native UI, but we'll need to build a wrapper to show this in Flutter.

The default screen opener is a banner rail. The contents of the banner can be scrolled if multiple openers are present. This is what that looks like on Android.



Unflow banner stack
Unflow banner stack



The code sample below shows the wrappers you need on both platforms to display this.

Both wrappers should be added to the respective native projects, then add the dart wrapper into your main flutter library.

OpenerWrapper.swift
OpenerViewWrapper.kt
OpenerView.dart
|

Finally, you can use the content inside your views.

main.dart
|

Here's what that code looks like on iOS and Android ( with a configured API Key )



Document image





Document image





Updated 11 May 2022
Did this page help?
Yes
No