This repository contains the Flutter plugins for the MoEngage platform.
Folder | Description |
---|---|
packages/moengage_flutter | Contains the implementation for the SDK implementation for Core MoEngage Platform |
packages/moengage_inbox | Contains the implementation for the SDK implementation for Inbox Feature |
packages/moengage_cards | Contains the implementation for the SDK implementation for Cards Feature |
packages/moengage_geofence | Contains the implementation for the SDK implementation for Geofence Feature |
example | Sample Integration for reference. |
Before running the sample application, you need to update your MoEngage workspace-id(Previously referred as AppId) in various files as follows:
-
In the
example/lib/constants.dart
file, update theWORKSPACE_ID
constant with your actual Workspace ID from the MoEngage Dashboard.const String WORKSPACE_ID = '<YOUR_WORKSPACE_ID>';
Add the MoEngage app-id in the local.properties
file of example --> android
. Add the below key and value and replace `moengageWorkspaceId`` with the Workspace Id on the MoEngage Dashboard.
moengageWorkspaceId=YOUR_WORKSPACE_ID
- Replace your
google-services.json
file in theexample/android/app
directory.
-
In the
example/ios/Runner/AppDelegate.swift
file, update theyourWorkspaceID
variable with your actual App ID.let yourWorkspaceID = "<YOUR_WORKSPACE_ID>"
-
Add your
GoogleService-Info.plist
file to theexample/ios/Runner
directory.
-
In the
example/web/index.html
file, update themoeWorkspaceID
variable with your actual App ID.<script> var moeWorkspaceID = "<YOUR_WORKSPACE_ID>"; </script>
After updating the Workspace ID and placing the necessary platform-specific files, follow the instructions below to run the application:
- Setup project using
melos bootstrap
command in the root directory. - Open the terminal and navigate to the
example
directory. - Run
flutter pub get
to fetch all the dependencies. - To run on Android or iOS, connect a device or start an emulator.
- Run the application with
flutter run
for your targeted platform.
Ensure that you have set up the development environment for Flutter and the respective platform you are targeting (Android Studio/Xcode for Android/iOS, updated web browser for Web) before attempting to run the sample application.