flutter_boost icon indicating copy to clipboard operation
flutter_boost copied to clipboard

crash in _completePendingNativeResultIfNeeded

Open hello-soon opened this issue 4 years ago • 2 comments

Unhandled Exception: type 'Null' is not a subtype of type 'Object' #0 _AsyncCompleter.complete (dart:async/future_impl.dart:46:41) #1 FlutterBoostAppState._completePendingNativeResultIfNeeded. (package:flutter_boost/flutter_boost_app.dart:521:28) #2 List.forEach (dart:core-patch/growable_array.dart:403:8) #3 FlutterBoostAppState._completePendingNativeResultIfNeeded (package:flutter_boost/flutter_boost_app.dart:520:10) #4 FlutterBoostAppState.onContainerShow. (package:flutter_boost/flutter_boost_app.dart:545:13) #5 new Future.delayed. (dart:async/future.dart:315:39) #6 _rootRun (dart:async/zone.dart:1346:47) #7 _CustomZone.run (dart:async/zone.dart:1258:19) #8 _CustomZone.runGuarded (dart:async/zone.dart:1162:7) #9 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1202:23)

image


简单的示例 Completer myCompleter; myCompleter = Completer<String>(); debugPrint("do do do "); myCompleter.complete();

必crash

hello-soon avatar Nov 17 '21 06:11 hello-soon

image

参考flutter的Navigator

image

hello-soon avatar Nov 17 '21 14:11 hello-soon

v3.0-release1.0的tag上仍会报这个错,push方法源码上我看已经有了T extends Object?,是不是还有pushWithResult需要加 image

joechan-cq avatar May 16 '22 09:05 joechan-cq