Skip to main content
Version: 1.0.0

In-app messages Plugin

note

Ensure the basic integration of the Nudge Core SDK is complete. If not, check here.

Overview

The nudge_modalsv2 package lets you add surveys to your flutter application.

Find the latest version of nudge_modalsv2 here

Step 1: Installation

Add nudge_modalsv2 to your pubspec.yaml file:


dependencies:
nudge_modalsv2: ^latest_version


Run the following command to fetch the package:

flutter pub get

Step 2 : Initialization

Now import the NudgeModalsUi() class from nudge_modalsv2.dart

import 'package:nudge_modalsv2/nudge_modalsv2.dart';

Create an instance of the NudgeModalsUi() class with your desired variable name

 popups = NudgeModalsUi();

Just add the above-defined variable into the list inplugins property of NudgeProvider

return NudgeProvider(
nudgeInstance: core,
plugins : [popups]
child: MaterialApp(
navigatorKey: NudgeProviderState.navigatorKey,
navigatorObservers : [_trackerObserver],
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Home(),
),
);

That's it!