简体   繁体   English

flutter_riverpod 1.0.0 阻止应用程序在调试模式下在 Chrome 中运行

[英]flutter_riverpod 1.0.0 prevents app from running in Chrome in debug mode

Hi ran into this issue when I upgraded to flutter_riverpod 1.0.0 then saw this issue raised in the riverpod repo嗨,当我升级到 flutter_riverpod 1.0.0 时遇到了这个问题,然后在 Riverpod 存储库中看到了这个问题

flutter_riverpod 1.0.0 ~Issue flutter_riverpod 1.0.0 ~问题

Then I saw that the owner of the repo closed the discussion about this leaving me clueless where to go next...然后我看到 repo 的所有者关闭了关于这个的讨论,让我不知道下一步要去哪里......

Will appreciate any help that I can get!!将不胜感激,我能得到任何帮助!

The issue is in dart sdk, not riverpod.问题出在 dart sdk,而不是 Riverpod。 You should track (and upvote so it hopefully gets prioritized) the linked dart sdk ticket for this, which should resolve it when it's fixed.您应该为此跟踪(并投票以希望获得优先级)链接的dart sdk 票证,它应该在修复后解决它。

尝试查看您是否已完成所有可能需要的迁移,例如在使用 consumerWidget 时,构建方法不采用 ProviderBased 对象,但现在它是 WidgetRef,您现在可以使用 WidgetRef 的实例并在其上调用 read 而不是 context.read( ) 读取提供程序并使用 WidgetRef 的实例并调用 watch 以查看提供程序中的更改,然后在运行 flutter pub 之后运行 flutter clean 获取有关 Riverpod 的更多文档的链接

This issue has been fixed by the flutter team :D此问题已由颤振团队修复:D

Just switch to the master branch and pull the latest version of flutter (2.6.0-12.pre.757) dart (2.16)切换到master分支,拉取最新版的flutter(2.6.0-12.pre.757) dart(2.16)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM