Comment on page
Mobile Flutter integration
For simplicity, this guide will assume your Mobile Flutter app deploys to both iOS and Android, and that your iOS native app is written in Swift, and your Android native app is written in Kotlin.
You must have the following installed:
- Android Studio, Intelli-J (Community Edition or Ultimate)
- Flutter 3.10.0+ SDK
- Xcode 14.3+
- iOS SDKs and associated Simulators.
- Android SDKs and associated Emulators.
- AppfigurateSE macOS app.
- Appfigurate Simulator app installed into one or more iOS Simulators (use the AppfigurateSE macOS app for easy 1 click installation).
- Appfigurate Emulator app installed into one or more Android Emulators.
- Your iOS app must target iOS 13.0+ in order to include Appfigurate Flutter Plugin.
- Your Android app must have a minimum API level 26 (Android 8.0 Oreo) in order to include Appfigurate Flutter Plugin.
Note: Replace any references to
quickstart
with your own apps target name.In your app's
pubspec.yaml
:Add the following to the
dependencies
section:appfigurateflutter: ^3.1.0
Perform a
pub get
to ensure the Appfigurate Flutter Plugin is successfully installed.Under the DART/FLUTTER LIBRARY INTEGRATION section:
Tap
Output implementation
then tap Console
.Under the SWIFT/IOS LIBRARY INTEGRATION section:
Tap
Output implementation
then tap Console
.Tap
Output Info.plist snippet
then tap Console
.Under the KOTLIN/ANDROID LIBRARY INTEGRATION section:
Tap
Output implementation
then tap Console
.Tap
Output AndroidManifest.xml snippet
then tap Console
.The output will be displayed in Android Studio, under the Logcat tab. Filter the output to application
nz.co.electricbolt.appfigurate
.In your apps
main.dart
file, initialize the Appfigurate Flutter Plugin:import 'package:appfigurateflutter/appfigurateflutter.dart';
void main() async {
await AppfigurateLibrary.initialize();
...
In your app, add a new Dart class, subclassing
APLNativeConfiguration
, called Configuration
.In your apps
Configuration.dart
file, paste the .dart implementation file output to the Console in Output source code snippets.import 'package:appfigurateflutter/appfigurateflutter.dart';
class Configuration extends APLNativeConfiguration {
factory Configuration() => _instance;
static Configuration _instance = Configuration._internal();
Configuration._internal();
bool get debugLogging => nativeBool("debugLogging");
String get serverUrl => nativeString("serverURL");
}
Last modified 2mo ago