SDK Installation

Flutter is Google’s UI toolkit for building natively compiled applications for iOS and Android from a single codebase.



To add MoEngage's Flutter SDK to your application, edit your pubspec.yaml to add moengage_flutter as a dependency.

    moengage_flutter: $lastestVersion

$latestVersion refers to the latest version of the plugin.

Post including the dependency run flutter pub get command in terminal to install the dependency.

Android SDK Installation


Add mavenCentral() repository in the project-level build.gradle file.

buildscript {
    repositories {

allprojects {
    repositories {

Once you install the Flutter Plugin add MoEngage's native Android SDK dependency to the Android project of your application along with the dependencies mentioned below.
Navigate to android --> app --> build.gradle. Add the MoEngage Android SDK's dependency inside the dependencies block

dependencies {
  implementation fileTree(dir: 'libs', include: ['*.jar'])
  implementation "com.moengage:moe-android-sdk:$sdkVersion"

where $sdkVersion should be replaced by the latest version of the MoEngage SDK.

iOS SDK Installation

We have added our native SDK MoEngage-iOS-SDK as a dependency for moengage_flutter plugin, hence run flutter build ios command once to generate the Pod file for your iOS project and run pod install inside your project's ios directory to add the plugin and native SDK to your iOS Project.

Web SDK Installation

To add the MoEngage Flutter Web SDK to your application, edit your application's pubspec.yaml file and add the below dependency to it:

 moengage_flutter_web: $latestSdkVersion

replace $latestSdkVersion with the latest SDK version.

Run flutter packages get to install the SDK.

Initialise Plugin

In the project's App Widget call initialise() of MoEngageFlutter plugin in initState() method as shown below:

  import 'package:moengage_flutter/moengage_flutter.dart';

  final MoEngageFlutter _moengagePlugin = MoEngageFlutter();

  void initState() {