@@ -27,7 +27,8 @@ class AlarmSchedulerService {
2727 return capabilities;
2828 } on MissingPluginException {
2929 AppLogger .debug (
30- '$_logTag getCapabilities -> unsupported: missing plugin' );
30+ '$_logTag getCapabilities -> unsupported: missing plugin' ,
31+ );
3132 return AlarmSchedulerCapabilities .unsupported;
3233 } on PlatformException catch (error) {
3334 AppLogger .debug (
@@ -50,7 +51,8 @@ class AlarmSchedulerService {
5051 return state;
5152 } on MissingPluginException {
5253 AppLogger .debug (
53- '$_logTag checkPermission -> unsupported: missing plugin' );
54+ '$_logTag checkPermission -> unsupported: missing plugin' ,
55+ );
5456 return AlarmPermissionState .unsupported;
5557 } on PlatformException catch (error) {
5658 AppLogger .debug (
@@ -73,7 +75,8 @@ class AlarmSchedulerService {
7375 return state;
7476 } on MissingPluginException {
7577 AppLogger .debug (
76- '$_logTag requestPermission -> unsupported: missing plugin' );
78+ '$_logTag requestPermission -> unsupported: missing plugin' ,
79+ );
7780 return AlarmPermissionState .unsupported;
7881 } on PlatformException catch (error) {
7982 AppLogger .debug (
@@ -149,9 +152,7 @@ class AlarmSchedulerService {
149152 }
150153 }
151154
152- Future <void > cancelAllNativeAlarms (
153- List <ScheduledAlarmRecord > records,
154- ) async {
155+ Future <void > cancelAllNativeAlarms (List <ScheduledAlarmRecord > records) async {
155156 for (final record in records) {
156157 await cancelNativeAlarm (record);
157158 }
@@ -182,7 +183,8 @@ class AlarmSchedulerService {
182183 final launchPayloadHandler = _launchPayloadHandler;
183184 if (launchPayloadHandler == null ) {
184185 AppLogger .debug (
185- '$_logTag dispatchPendingLaunchPayload skipped: no handler' );
186+ '$_logTag dispatchPendingLaunchPayload skipped: no handler' ,
187+ );
186188 return ;
187189 }
188190 if (kIsWeb) {
@@ -209,6 +211,9 @@ class AlarmSchedulerService {
209211 '${error .code } ${error .message }' ,
210212 );
211213 return ;
214+ } catch (error) {
215+ AppLogger .debug ('$_logTag getLaunchPayload invalid response: $error ' );
216+ return ;
212217 }
213218 }
214219
@@ -266,8 +271,6 @@ class AlarmSchedulerService {
266271
267272 Map <String , String >? _payloadFromObject (Object ? raw) {
268273 if (raw is ! Map ) return null ;
269- return raw.map (
270- (key, value) => MapEntry (key.toString (), value.toString ()),
271- );
274+ return raw.map ((key, value) => MapEntry (key.toString (), value.toString ()));
272275 }
273276}
0 commit comments