Flutter is an open-source UI software development kit created by Google. It enabled you to develop apps for Android, iOS, Linux, Mac, Windows, Google Fuchsia, and the web from a single codebase. The WebEngage Flutter Mobile SDK supports all the latest OS versions of Android and iOS.


Sample Application

Check this out for the sample main.dart.

Here's how you can integrate the WebEngage SDK with your Flutter apps:

1. Installation

Step 1: Add the webengage_flutter plugin in your pubspec.yaml file.

webengage_flutter: 1.0.3


Flutter version support

WebEngage Plugin 1.0.3 and above supports Flutter 2.2 (null-safety).
Use 1.0.2, if your application does not support Flutter null-safety.

Step 2: Run flutter packages get to install the SDK.

2. Android Initialization

Step 1: Initialize WebEngage in main.dart in initState();

WebEngagePlugin _webEngagePlugin = new WebEngagePlugin();

Step 2: Add your custom Application class to your android project.

public class MainApplication extends FlutterApplication {
    public void onCreate() {

Add the entry in the application tag for your Application class in the AndroidManifest.class


Step 3: Initialize WebEngage Android SDK in your 'MainApplication' class.

import com.webengage.sdk.android.WebEngageActivityLifeCycleCallbacks;
import io.flutter.app.FlutterApplication;
import com.webengage.webengage_plugin.WebengageInitializer;
import com.webengage.sdk.android.WebEngageConfig;
import com.webengage.sdk.android.WebEngage;
import com.webengage.sdk.android.WebEngageActivityLifeCycleCallbacks;
import com.webengage.sdk.android.LocationTrackingStrategy;

public class MainApplication extends FlutterApplication {
    public void onCreate() {
         WebEngageConfig webEngageConfig = new WebEngageConfig.Builder()
                .setDebugMode(true) // only in development mode
        WebengageInitializer.initialize(this, webEngageConfig);

3. iOS Initialization

Step 1: Add WebEngage configurations <your-project>/ios/<YourApp>/Info.plist file.


Step 2: Initialize WebEngage iOS SDK in <your-project>/ios/<YourApp>/AppDelegate.m file.

#import <WebEngage/WebEngage.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary * launchOptions {
    [[WebEngage sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
  return [super application:application didFinishLaunchingWithOptions:launchOptions];




You have successfully integrated WebEngage with your Flutter apps and are sending user session data to WebEngage. Please note that it may take up to a few minutes for data to reflect on your dashboard.

Please feel free to drop in a few lines at [email protected] in case you have any further queries. We're always just an email away!

Updated about a month ago

So, what's next?

We recommend that you implement the following integrations with your app before releasing it with WebEngage for the first time:

Track User Properties as User Attributes
Track User Actions as Events
Configure Push Messaging
Configure In-app Messaging


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.