11/17/1
This commit is contained in:
@@ -130,6 +130,8 @@ void main() async {
|
||||
}
|
||||
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
NotificationController notificationController =
|
||||
Get.put(NotificationController());
|
||||
await Firebase.initializeApp(
|
||||
options: DefaultFirebaseOptions.currentPlatform,
|
||||
);
|
||||
@@ -141,8 +143,7 @@ void main() async {
|
||||
// if (Platform.isAndroid) {
|
||||
// await Get.put(NotificationController()).initNotifications();
|
||||
// }
|
||||
NotificationController notificationController =
|
||||
Get.put(NotificationController());
|
||||
|
||||
await notificationController.initNotifications();
|
||||
|
||||
// Generate a random index to pick a message
|
||||
@@ -150,7 +151,7 @@ void main() async {
|
||||
final randomMessage = driverMessages[random.nextInt(driverMessages.length)];
|
||||
|
||||
// Schedule the notification with the random message
|
||||
notificationController.scheduleDailyNotifications(
|
||||
notificationController.scheduleNotificationsForSevenDays(
|
||||
randomMessage.split(':')[0],
|
||||
randomMessage.split(':')[1],
|
||||
"ding",
|
||||
|
||||
Reference in New Issue
Block a user