Flutter

Introduction

The SDK supports programmatic integration with Flutter.

These instructions assume that you have already read the Developer Guide. If you have not yet done so, please do so before continuing below.

This SDK comes with an example app: a full Android Studio project is enclosed, based on the http package. The app uses the Reblaze Flutter plugin (it is part of the same SDK zip). You can play with this example to understand how SDK integration works.

Installation

Unpack the ReblazeSDK.zip to your computer, and add the to your pubsepec.yaml dependencies:

  reblaze:
    path: ${sdkRootDir}/libs/flutter

Please note that the plugin itself depends on the native Mobile Reblaze SDK, so you should keep the whole directory of `libs` with its subdirectories together.

Auto-signing is not supported in Flutter even on iOS, but may help for embedded WebViews of your Flutter app.

Finding the App Signature

With Flutter, you actually have two signatures that must be uploaded to the Reblaze Console. Follow the instructions for Android and iOS. For the debug version that runs on Emulator/Simulator, the special signature: "abadbabe" will be exposed. Make sure that this is disabled on Production.

Working with SDK

In Flutter, access to SDK goes through MethodChannel and is async.

For example:

reblaze.setInterval(25);
rbzSdk = await reblaze.generateHash();

Also, in Flutter we don't expose the reblaze.setEventListener() API. If you need this monitoring, you can add this to Android and iOS native code of your app.

Mocking is fully supported by the the Flutter plugin.

Last updated