diff --git a/lib/main.dart b/lib/main.dart index fc73eac..c856cb3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -71,6 +71,7 @@ Future initializeService() async { void onDidReceiveNotificationResponse( NotificationResponse notificationResponse) async { print("Clicked on notification"); + stopAlarm(); } await flutterLocalNotificationsPlugin.initialize(initializationSettings, @@ -163,7 +164,6 @@ class _MyAppState extends State { service.startService(); } else { service.invoke("stopService"); - stopAlarm(); } print("Changing service status to $serviceEnabled"); await storage.setString("serviceEnabled", jsonEncode(serviceEnabled)); diff --git a/pubspec.yaml b/pubspec.yaml index ef29cd1..43ca59f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0 +version: 0.5.0 environment: sdk: '>=2.18.6 <3.0.0'