Links

Flutter SDK Setup

1. Requirements

Can be used with other push solutions!

To use FlareLane with other push solutions, you must follow some additional steps. Refer to iOS: Disable Swizzling for details.
  • Sign up to FlareLane and create a project

2. Setup a Certificate

Follow this guide below:

3. Install SDK

$ flutter pub add flarelane_flutter

4. Support for Android 13

To ensure a smooth process for obtaining permission for push notifications from users, please make sure that both conditions below are satisfied.
  • Using FlareLane SDK 1.2.0 or higher
  • Set compileSdkVersion to at least 33
android/app/build.gradle
// ...
android {
compileSdkVersion 33
// ...
}
// ...

5. Configure for iOS

  1. 1.
    Enter cd ios in Terminal to go to the ios directory
  2. 2.
    At the top of the Podfile, enter platform :ios, '11.0' or higher than version 11
  3. 3.
    Run pod install in the terminal
  4. 4.
    Run the Xcode project by opening the <YOUR_PROJECT_NAME>.xcworkspace
  5. 5.
    Enter 11.0 or higher as Deployment Target of the PROJECT
  6. 6.
    Enter 11.0 or higher as Minimum Deployments of the TARGET
  7. 7.
    Go to Signing & Capabilities and click + Capability and add Push Notifications

6. Add Initialization Code

Add the following code to main.dart. You can check your project ID at FlareLane console's Project.
main.dart
import 'package:flarelane_flutter/flarelane_flutter.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
// Add the code below after WidgetsFlutterBinding.ensureInitialized()
FlareLane.shared.initialize("INPUT_YOUR_PROJECT_ID");
runApp(...);
}

7. Test

After completing all the steps, build and run your app. Devices that subscribe to push notifications will be automatically added to FlareLane console's All Devices.
Before actual deployment, be sure to verify that the push notifications are being received properly on the device and that the statistics are accurately recorded when the push notifications are clicked.

8. Advanced Settings

To customize notification icons, see below:
To attach an image to push notifications, see below:
To use Journeys or Message Personalization, integrate custom data via SDK or API: