⚙️
【Flutter】riverpodの追加 導入・設定まとめ
概要
Flutterプロジェクトにriverpodを追加する際、パッケージがいくつかあったり、機能を有効にするコードを追加しなければいけない。
ここを見ればOKとなるようなページを作成し効率化を図る。
パッケージの追加
dependencies
flutter pub add flutter_riverpod
dev_dependencies
flutter pub add -d custom_lint riverpod_lint riverpod_generator
flutter_lintの設定
analysis_options.yaml
に以下を追加。
analyzer:
plugins:
- custom_lint
Discussion