有时在我的应用中会收到此错误,但是我不确定它的起源,因为这就是它为我提供的全部信息
I/flutter (10601): #0 _AsyncCompleter.complete (dart:async/future_impl.dart:39:31)
I/flutter (10601): #1 Route.didComplete (package:flutter/src/widgets/navigator.dart:189:19)
I/flutter (10601): #2 NavigatorState.pushReplacement.<anonymous closure> (package:flutter/src/widgets/navigator.dart:1846:13)
I/flutter (10601): #3 TickerFuture.whenCompleteOrCancel.thunk (package:flutter/src/scheduler/ticker.dart:389:15)
I/flutter (10601): #4 _rootRunUnary (dart:async/zone.dart:1132:38)
I/flutter (10601): #5 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
I/flutter (10601): #6 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
I/flutter (10601): #7 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
I/flutter (10601): #8 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
I/flutter (10601): #9 Future._completeWithValue (dart:async/future_impl.dart:483:5)
I/flutter (10601): #10 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:513:7)
I/flutter (10601): #11 _rootRun (dart:async/zone.dart:1124:13)
I/flutter (10601): #12 _CustomZone.run (dart:async/zone.dart:1021:19)
I/flutter (10601): #13 _CustomZone.runGuarded (dart:async/zone.dart
I/flutter (10601): Caught error: Bad state: Future already completed
我不确定为什么发生这种情况的主要原因是日志记录不足,但是我认为这可能与pushReplacementNamed函数有关。