File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 1- import 'dart:io' ;
21import 'dart:ui' ;
32
43import 'package:flutter/services.dart' ;
@@ -16,19 +15,18 @@ void callbackDispatcher() {
1615 ..setMethodCallHandler ((call) async {
1716 final args = call.arguments as List <dynamic >;
1817 final handle = CallbackHandle .fromRawHandle (args[0 ] as int );
18+ final id = args[1 ] as String ;
19+ final status = args[2 ] as int ;
20+ final progress = args[3 ] as int ;
21+
1922 final callback = PluginUtilities .getCallbackFromHandle (handle) as void
2023 Function (String id, int status, int progress)? ;
2124
2225 if (callback == null ) {
23- // ignore: avoid_print
24- print ('fatal error: could not find callback' );
25- exit (1 );
26+ // The callback wasn't registered. Ignore.
27+ return ;
2628 }
2729
28- final id = args[1 ] as String ;
29- final status = args[2 ] as int ;
30- final progress = args[3 ] as int ;
31-
3230 callback (id, status, progress);
3331 })
3432 ..invokeMethod <void >('didInitializeDispatcher' );
You can’t perform that action at this time.
0 commit comments