简体   繁体   中英

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 ~Issue

Then I saw that the owner of the repo closed the discussion about this leaving me clueless where to go next...

Will appreciate any help that I can get!!

The issue is in dart sdk, not 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.

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

This issue has been fixed by the flutter team :D

Just switch to the master branch and pull the latest version of flutter (2.6.0-12.pre.757) dart (2.16)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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