我最近更新到Flutter v2,并希望在Chrome中启动我的应用程序。我尝试了所有方法来修复这个bug,但没有任何帮助。
整个例外:
Error: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/package_info)
at Object.throw_ [as throw] (http://localhost:59662/dart_sdk.js:5355:11)
at MethodChannel._invokeMethod (http://localhost:59662/packages/flutter/src/services/system_channels.dart.lib.js:962:21)
at _invokeMethod.next (<anonymous>)
at http://localhost:59662/dart_sdk.js:39215:33
at _RootZone.runUnary (http://localhost:59662/dart_sdk.js:39072:58)
at _FutureListener.thenAwait.handleValue (http://localhost:59662/dart_sdk.js:34058:29)
at handleValueCallback (http://localhost:59662/dart_sdk.js:34618:49)
at Function._propagateToListeners (http://localhost:59662/dart_sdk.js:34656:17)
at _Future.new.[_completeWithValue] (http://localhost:59662/dart_sdk.js:34498:23)
at async._AsyncCallbackEntry.new.callback (http://localhost:59662/dart_sdk.js:34521:35)
at Object._microtaskLoop (http://localhost:59662/dart_sdk.js:39359:13)
at _startMicrotaskLoop (http://localhost:59662/dart_sdk.js:39365:13)
at http://localhost:59662/dart_sdk.js:34872:9
它在我的IOS模拟器上运行得非常好。
2条答案
按热度按时间bttbmeg01#
只需添加一些延迟,然后在setState()中执行Provider或Async操作,您的问题将得到解决
hkmswyz62#
我在打开视图之前添加了它。