To integrate Pop-ups into Flutter, you need to make sure that the basic integration of the Nudge Core SDK is done, if you have not already done it, check here.
Now import the NudgePopupsUi()
class from nudge_modals_ui.dart
import 'package:nudge_modals_ui/nudge_modals_ui.dart';
Create an instance of the NudgePopupsUi()
class with your desired variable name
popups = NudgePopupsUi();
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(),
),
);