diff --git a/lib/main.dart b/lib/main.dart index a4495b4..8c2ab70 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:get/get.dart'; import 'package:timezone/data/latest.dart' as tz; @@ -34,13 +35,14 @@ void main() async { initGetStorage(); + SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light); + Get.lazyPut(() => ThemeController()); runApp(MyApp()); } -// ignore: must_be_immutable class MyApp extends StatelessWidget { - var _primaryColour = Colors.teal; + final _primaryColour = Colors.teal; @override Widget build(BuildContext context) { @@ -54,7 +56,8 @@ class MyApp extends StatelessWidget { primaryColor: _primaryColour, bottomAppBarColor: Colors.teal.shade50, visualDensity: VisualDensity.adaptivePlatformDensity, - appBarTheme: AppBarTheme(color: _primaryColour), + appBarTheme: + AppBarTheme(color: _primaryColour, brightness: Brightness.dark), ), darkTheme: ThemeData.dark().copyWith( primaryColor: _primaryColour, diff --git a/lib/utils/isolate_handler_notification.dart b/lib/utils/isolate_handler_notification.dart index 324b7d0..4e94a75 100644 --- a/lib/utils/isolate_handler_notification.dart +++ b/lib/utils/isolate_handler_notification.dart @@ -93,7 +93,7 @@ void schedulePrayNotification(List times) async { DateTime.fromMillisecondsSinceEpoch(isyakTimeEpoch), tz.local)); } - print('Notification scheduled'); + print('Notification scheduled #$i'); print('Subuh @ $subuhTimeEpoch'); print('Syuruk @ $syurukTimeEpoch'); print('Zohor @ $zuhrTimeEpoch'); @@ -113,6 +113,8 @@ void schedulePrayNotification(List times) async { 1, 0, 5), //2021-01-01 00:05:00.000+0800 ); + print('DONE SCHEDULING NOTIFS'); + killCurrentScheduleNotifications(); } diff --git a/pubspec.lock b/pubspec.lock index cdac67f..f6304c8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -145,7 +145,7 @@ packages: name: flutter_cache_manager url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" flutter_isolate: dependency: transitive description: @@ -159,7 +159,7 @@ packages: name: flutter_local_notifications url: "https://pub.dartlang.org" source: hosted - version: "3.0.2" + version: "3.0.3" flutter_local_notifications_platform_interface: dependency: transitive description: @@ -211,7 +211,7 @@ packages: name: geolocator url: "https://pub.dartlang.org" source: hosted - version: "6.1.13" + version: "6.1.14" geolocator_platform_interface: dependency: transitive description: @@ -358,7 +358,7 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "1.6.24" + version: "1.6.27" path_provider_linux: dependency: transitive description: @@ -372,7 +372,7 @@ packages: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.4+6" + version: "0.0.4+8" path_provider_platform_interface: dependency: transitive description: @@ -428,7 +428,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "4.3.2+3" + version: "4.3.3" rxdart: dependency: "direct main" description: @@ -461,14 +461,14 @@ packages: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "1.3.2+1" + version: "1.3.2+2" sqflite_common: dependency: transitive description: name: sqflite_common url: "https://pub.dartlang.org" source: hosted - version: "1.0.2+1" + version: "1.0.3" stack_trace: dependency: transitive description: