trigger method
Future<void>
trigger({
- required BuildContext context,
- required String userStatId,
- String position = "FULL_SCREEN",
- required String event,
- Map<
String, dynamic> ? gameSettingDetails,
override
Implementation
@override
Future<void> trigger({
required BuildContext context,
required String userStatId,
String position = "FULL_SCREEN",
required String event, //TODO : event
Map<String, dynamic>? gameSettingDetails,
}) async {
// print("NudgeBottomSheetsUi: $id, $token, $userStatId, $event, $position");
BottomSheetsRepo bottomSheetsRepo = BottomSheetsRepo(
nudgeId: id,
token: token,
baseUrl: nudgeUrl,
);
NudgeBottomSheets nudgeBottomSheetsData =
await bottomSheetsRepo.getNudgesBottomSheets();
print(
"$type, $event, $token, $nudgeUrl, ${nudgeBottomSheetsData.data.gameId}");
await submitApi(
type,
id,
event,
{
"index": 0,
"type": nudgeBottomSheetsData.data.nudges[0].type!,
"action":
"${nudgeBottomSheetsData.data.nudges[0].type!.toUpperCase()}_OPENED",
"sizeOfArr": nudgeBottomSheetsData.data.nudges.length,
},
token,
nudgeUrl,
);
//_dialogBuilder(context, nudgeBottomSheetsData, 0, event);
}