@@ -24,14 +24,15 @@ class FlutterShortcutsMethodCallHandler extends FlutterShortcutsPlatform {
2424 assert (call.method == 'launch' );
2525 actionHandler (call.arguments);
2626 });
27- final String action = await channel.invokeMethod <String >('getLaunchAction' );
27+ final String ? action =
28+ await channel.invokeMethod <String >('getLaunchAction' );
2829 if (action != null ) {
2930 actionHandler (action);
3031 }
3132 }
3233
3334 @override
34- Future <int > getMaxShortcutLimit () {
35+ Future <int ? > getMaxShortcutLimit () {
3536 return channel.invokeMethod <int >('getMaxShortcutLimit' );
3637 }
3738
@@ -46,7 +47,7 @@ class FlutterShortcutsMethodCallHandler extends FlutterShortcutsPlatform {
4647
4748 @override
4849 Future <void > setShortcutItems (List <FlutterShortcutItem > items) async {
49- final List <Map <String , String >> itemsList =
50+ final List <Map <String , String ? >> itemsList =
5051 items.map (_serializeItem).toList ();
5152 await channel.invokeMethod <void >('setShortcutItems' , itemsList);
5253 }
@@ -58,28 +59,28 @@ class FlutterShortcutsMethodCallHandler extends FlutterShortcutsPlatform {
5859
5960 @override
6061 Future <void > pushShortcutItem (FlutterShortcutItem shortcut) async {
61- final Map <String , String > item = _serializeItem (shortcut);
62+ final Map <String , String ? > item = _serializeItem (shortcut);
6263 await channel.invokeMethod <void >('pushShortcutItem' , [item]);
6364 }
6465
6566 @override
6667 Future <void > pushShortcutItems (List <FlutterShortcutItem > items) async {
67- final List <Map <String , String >> itemsList =
68+ final List <Map <String , String ? >> itemsList =
6869 items.map (_serializeItem).toList ();
6970 await channel.invokeMethod <void >('pushShortcutItems' , itemsList);
7071 }
7172
7273 @override
7374 Future <void > updateShortcutItems (List <FlutterShortcutItem > items) async {
74- final List <Map <String , String >> itemsList =
75+ final List <Map <String , String ? >> itemsList =
7576 items.map (_serializeItem).toList ();
7677 await channel.invokeMethod <void >('updateShortcutItems' , itemsList);
7778 }
7879
7980 @override
8081 Future <void > updateShortcutItem (
8182 String id, FlutterShortcutItem shortcut) async {
82- final Map <String , String > item = _serializeItem (shortcut);
83+ final Map <String , String ? > item = _serializeItem (shortcut);
8384 await channel.invokeMethod <void >('updateShortcutItem' , [item]);
8485 }
8586
@@ -99,8 +100,8 @@ class FlutterShortcutsMethodCallHandler extends FlutterShortcutsPlatform {
99100 await channel.invokeMethod <void >('changeShortcutItemIcon' , [id, icon]);
100101 }
101102
102- Map <String , String > _serializeItem (FlutterShortcutItem item) {
103- return < String , String > {
103+ Map <String , String ? > _serializeItem (FlutterShortcutItem item) {
104+ return < String , String ? > {
104105 'id' : item.id,
105106 'action' : item.action,
106107 'shortLabel' : item.shortLabel,
0 commit comments