This commit is contained in:
Hamza-Ayed
2024-11-17 12:02:54 +02:00
parent bf8a29b814
commit f796f4bc48
13 changed files with 611 additions and 493 deletions

View File

@@ -45,18 +45,6 @@ void main() async {
// if (Platform.isAndroid) {
NotificationController notificationController =
Get.put(NotificationController());
await notificationController.initNotifications();
// Generate a random index to pick a message
final random = Random();
final randomMessage = messages[random.nextInt(messages.length)];
// Schedule the notification with the random message
notificationController.scheduleDailyNotifications(
randomMessage.split(':')[0],
randomMessage.split(':')[1],
"ding",
);
// await NotificationController().initNotifications();
// }
@@ -100,13 +88,18 @@ void main() async {
userTokenExpiration: 200,
iFrameID: 837992,
);
// Get device information
// List<Map<String, dynamic>> deviceDataList =
// await DeviceInfoPlus.getDeviceInfo();
//
// // Print all device data
// DeviceInfoPlus.printDeviceInfo();
await notificationController.initNotifications();
// Generate a random index to pick a message
final random = Random();
final randomMessage = messages[random.nextInt(messages.length)];
// Schedule the notification with the random message
notificationController.scheduleNotificationsForSevenDays(
randomMessage.split(':')[0],
randomMessage.split(':')[1],
"tone1",
);
runApp(const MyApp());
}