12/22/1
This commit is contained in:
@@ -29,8 +29,8 @@ class NotificationController extends GetxController {
|
||||
requestAlertPermission: true,
|
||||
requestBadgePermission: true,
|
||||
requestSoundPermission: true,
|
||||
onDidReceiveLocalNotification:
|
||||
(int id, String? title, String? body, String? payload) async {},
|
||||
// onDidReceiveLocalNotification:
|
||||
// (int id, String? title, String? body, String? payload) async {},
|
||||
);
|
||||
InitializationSettings initializationSettings =
|
||||
InitializationSettings(android: android, iOS: ios);
|
||||
@@ -176,11 +176,12 @@ class NotificationController extends GetxController {
|
||||
message,
|
||||
scheduledTime,
|
||||
details,
|
||||
androidAllowWhileIdle: true,
|
||||
// androidAllowWhileIdle: true,
|
||||
uiLocalNotificationDateInterpretation:
|
||||
UILocalNotificationDateInterpretation.absoluteTime,
|
||||
matchDateTimeComponents:
|
||||
DateTimeComponents.time, // Triggers daily at the same time
|
||||
matchDateTimeComponents: DateTimeComponents.time,
|
||||
androidScheduleMode:
|
||||
AndroidScheduleMode.alarmClock, // Triggers daily at the same time
|
||||
);
|
||||
print('Notification scheduled successfully');
|
||||
}
|
||||
@@ -232,6 +233,7 @@ class NotificationController extends GetxController {
|
||||
uiLocalNotificationDateInterpretation:
|
||||
UILocalNotificationDateInterpretation.absoluteTime,
|
||||
matchDateTimeComponents: DateTimeComponents.time,
|
||||
androidScheduleMode: AndroidScheduleMode.alarmClock,
|
||||
);
|
||||
print('Notification scheduled successfully');
|
||||
});
|
||||
@@ -397,10 +399,11 @@ class NotificationController extends GetxController {
|
||||
message.tr,
|
||||
scheduledTime,
|
||||
details,
|
||||
androidAllowWhileIdle: true,
|
||||
// androidAllowWhileIdle: true,
|
||||
uiLocalNotificationDateInterpretation:
|
||||
UILocalNotificationDateInterpretation.absoluteTime,
|
||||
matchDateTimeComponents: DateTimeComponents.time,
|
||||
androidScheduleMode: AndroidScheduleMode.alarmClock,
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user