6
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【バグ速報】Flutter Web で Riverpod が動かない時の回避策

Posted at

Flutterアプリ開発者の間で人気の Riverpod というパッケージが 1.0.0 になって喜んでいたら
Debugモードで Chorme で実行した時に、この状態から進まなくなりました。

stuck.png

Riverpodの開発者によれば、これは Dart のバグであって、パッケージ側の不具合ではないらしいです。

まさに今 issue が進んでいます。そのため、すぐに修正が入ると思いますが、それまでの間の回避策を共有しておきます。
https://github.com/dart-lang/sdk/issues/47645

一時的な回避策

  • pubspec.yaml で指定するパッケージのバージョンを開発版にします
  • flutter_riverpod , riverpod の両方ともを 1.0.0-dev.10 にしてください
pubspec.yaml
dependencies:
  flutter_riverpod: 1.0.0-dev.10
  riverpod: 1.0.0-dev.10

本質的な原因を知りたければ 1.0.0を使った時に、詳細なログを確認できるモードで実行するとエラー内容が見えるらしいですが、私には難しくてよくわかりませんでした。
素直に解決を待ちたいと思います。

6
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?