gpt4 book ai didi

Flutter:一个空值被传递到一个不可为空的参数值中,当启用运行时空安全时,这将成为一个失败

转载 作者:行者123 更新时间:2023-12-04 02:36:12 25 4
gpt4 key购买 nike

我正在使用 Flutter 开发 Web 应用。

我在我的应用程序上工作了几天,一切正常,但从今天早上开始,我在运行该应用程序时总是收到此警告:

"A null value was passed into a non-nullable parameter value
This will become a failure when runtime null safety is enabled."

在我更改我的代码中的 RANDOM 内容之前,没有任何错误真正发生,它是什么并不重要。然后出现这个错误:

Error: Invalid argument(s): Extension already registered: ext.flutter.disassemble
at Object.throw_ [as throw] (http://localhost:51499/dart_sdk.js:4461:11)
at Object.registerExtension$ [as registerExtension] (http://localhost:51499/dart_sdk.js:48563:17)
at Object.webOnlyInitializeEngine (http://localhost:51499/dart_sdk.js:163999:15)
at _initializePlatform (http://localhost:51499/dart_sdk.js:134269:15)
at _initializePlatform.next (<anonymous>)
at runBody (http://localhost:51499/dart_sdk.js:36923:34)
at Object._async [as async] (http://localhost:51499/dart_sdk.js:36951:7)
at Object._initializePlatform (http://localhost:51499/dart_sdk.js:134265:18)
at Object.webOnlyInitializePlatform (http://localhost:51499/dart_sdk.js:134257:35)
at main$ (http://localhost:51499/web_entrypoint.dart.lib.js:16:16)
at main$.next (<anonymous>)
at runBody (http://localhost:51499/dart_sdk.js:36923:34)
at Object._async [as async] (http://localhost:51499/dart_sdk.js:36951:7)
at Object.main$ [as main] (http://localhost:51499/web_entrypoint.dart.lib.js:14:18)
at RequireRestarter__reload_closure.call$0 (http://localhost:51499/dwds/src/injected/client.js:22818:15)
at Object.Primitives_applyFunction (http://localhost:51499/dwds/src/injected/client.js:860:30)
at Object.Function_apply (http://localhost:51499/dwds/src/injected/client.js:5012:16)
at _callDartFunctionFast (http://localhost:51499/dwds/src/injected/client.js:7001:16)
at http://localhost:51499/dwds/src/injected/client.js:6992:18
at <anonymous>:1:8
at Object.runMain (http://localhost:51499/dwds/src/injected/client.js:8343:15)
at http://localhost:51499/dwds/src/injected/client.js:22335:19
at _wrapJsFunctionForAsync_closure.$protected (http://localhost:51499/dwds/src/injected/client.js:3636:15)
at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:51499/dwds/src/injected/client.js:10848:12)
at Object._asyncStartSync (http://localhost:51499/dwds/src/injected/client.js:3600:20)
at main__closure1.$call$body$main__closure (http://localhost:51499/dwds/src/injected/client.js:22347:16)
at main__closure1.call$1 (http://localhost:51499/dwds/src/injected/client.js:22279:19)
at StaticClosure._rootRunUnary [as call$2$5] (http://localhost:51499/dwds/src/injected/client.js:3958:16)
at _CustomZone.runUnary$2$2 (http://localhost:51499/dwds/src/injected/client.js:12164:39)
at _CustomZone.runUnaryGuarded$1$2 (http://localhost:51499/dwds/src/injected/client.js:12092:14)
at _ControllerSubscription._sendData$1 (http://localhost:51499/dwds/src/injected/client.js:11642:19)
at _DelayedData.perform$1 (http://localhost:51499/dwds/src/injected/client.js:11796:59)
at _PendingEvents_schedule_closure.call$0 (http://localhost:51499/dwds/src/injected/client.js:11845:14)
at Object._microtaskLoop (http://localhost:51499/dwds/src/injected/client.js:3801:21)
at StaticClosure._startMicrotaskLoop (http://localhost:51499/dwds/src/injected/client.js:3807:11)
at _AsyncRun__initializeScheduleImmediate_internalCallback.call$1 (http://localhost:51499/dwds/src/injected/client.js:10720:9)
at invokeClosure (http://localhost:51499/dwds/src/injected/client.js:1172:26)
at MutationObserver.<anonymous> (http://localhost:51499/dwds/src/injected/client.js:1191:18)

已经运行 flutter doctor和 flutter analyze - 没有什么特别的。

知道为什么会发生这种情况吗?以前有其他人遇到过这个错误吗?

(哦,当我将 flutter 升级到 1.19 时它开始发生,所以我猜它与此有关)

谢谢:)

最佳答案

你是对的。此问题发生在最新版本上。

在尝试进一步调查时,现在我打开了 issue 56844 .

关于Flutter:一个空值被传递到一个不可为空的参数值中,当启用运行时空安全时,这将成为一个失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61708880/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com