This commit is contained in:
Hamza-Ayed
2024-12-22 01:36:07 +03:00
parent 90d4ca39bf
commit 2910750483
32 changed files with 1804 additions and 1231 deletions

View File

@@ -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,
);
});