To integrate NudgeQuizUi
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.
Step 1:
Impory the NudgeQuizUi()
class.
import 'package:nudge_quiz/nudge_quiz.dart';
Step 2
Create an instance of the NudgeQuizUi()
class with your desired variable name
final quizUi = NudgeQuizUi();
Add the above-defined variable into the list inplugins
property of NudgeProvider
return NudgeProvider(
nudgeInstance: core,
plugins : [quizUi]
child: MaterialApp(
navigatorKey: NudgeProviderState.navigatorKey,
navigatorObservers : [_trackerObserver],
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Home(),
),
);
That's it!
Our Nudge Core would now trigger Quizzes defined on your Dashboard using the NudgeQuizUi
plugin.