Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Riverpodに機能追加したときの話 (long ver.)
Search
K9i - Kota Hayashi
July 14, 2023
Programming
0
470
Riverpodに機能追加したときの話 (long ver.)
K9i - Kota Hayashi
July 14, 2023
Tweet
Share
More Decks by K9i - Kota Hayashi
See All by K9i - Kota Hayashi
北九州でFlutterハンズオンをしたので雑多に振り返る
k9i
0
84
FFF(Fukuoka Flutter Fanclub)の紹介
k9i
0
120
Flutter Favoriteプログラムについて調べてみた
k9i
0
1.3k
2023年のFlutter(オフライン)イベントを振り返る
k9i
0
270
Flutterの魅力とコミュニティ活動
k9i
0
510
Flutterエンジニア向け?おすすめmac向けアプリ
k9i
0
480
ゆめみの謎制度「フルリモし放題制度 ㊗️ MAX」で買ったものを紹介します
k9i
0
500
Flutter導入時に警戒すべき要件X選
k9i
1
870
FlutterでTikTokログインができるパッケージを作った話 (short ver.)
k9i
0
770
Other Decks in Programming
See All in Programming
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
490
CSC307 Lecture 12
javiergs
PRO
0
460
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
2
440
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
360
TipKitTips
ktcryomm
0
160
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
160
Event Storming
hschwentner
3
1.3k
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
460
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
590
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
110
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
480
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
250
Featured
See All Featured
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
260
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
150
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Bash Introduction
62gerente
615
210k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
BBQ
matthewcrist
89
10k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
460
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
890
The World Runs on Bad Software
bkeepers
PRO
72
12k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
65
What does AI have to do with Human Rights?
axbom
PRO
1
2k
Transcript
Riverpodに機能追加したとき の話 (long ver.) 第4回 FlutterGakkai Kota Hayashi (K9i)
自己紹介
YUMEMIについて - Flutterにも力入れてます - 新卒エンジニアとリードエンジニアを募集中
YUMEMIについて - Flutterにも力入れてます - 新卒エンジニアとリードエンジニアを募集中 定期的に勉強会を開催中 タイミングがあったら参加してね
Riverpod? - 日本だと特に人気が高い状態管理ライブラリ - 最近はデファクトスタンダード? - 世界的にはBLoCなんかも人気 - https://docs-v2.riverpod.dev/
追加した機能
追加した機能 Riverpod関連のWidget を相互に変換する
BaseとなるWidgetの変換(Before)
BaseとなるWidgetの変換(Before) flutter, flutter_riverpodパケージのWidgetを ConsumerWidgetかConsuerStatefulWidgetに変 換可能
BaseとなるWidgetの変換(After)
BaseとなるWidgetの変換(After) すべて相互に変換可能
変更したパッケージ - Riverpodはマルチパッケージ構成 - riverpod - flutter_riverpod - hooks_riverpod -
riverpod_generator - riverpod_lint - など
変更したパッケージ - Riverpodはマルチパッケージ構成 - riverpod - flutter_riverpod - hooks_riverpod -
riverpod_generator - riverpod_lint - など MelostというDart向けのマ ルチパッケージ管理ツール が使われている https://melos.invertase.dev /~melos-latest
変更したパッケージ - Riverpodはマルチパッケージ構成 - riverpod - flutter_riverpod - hooks_riverpod -
riverpod_generator - riverpod_lint - など 変更したのはこれ
機能追加の流れ 1. Notionに既存処理の流れを洗い出した
None
機能追加の流れ 1. Notionに既存処理の流れを洗い出した 2. custom_lint_builderの使い方をキャッチアップ
custom_lint_builderの使い方をキャッチアップ - riverpod_lintはcustom_lint_builderパッケージで実現されている - 使い方の説明はcustom_lintパッケージのreadme - https://pub.dev/packages/custom_lint#creating-a-custom -lint-package
機能追加の流れ 1. Notionに既存処理の流れを洗い出した 2. custom_lint_builderの使い方をキャッチアップ 3. 実装 4. hooks関連の問題発生
hooks関連の問題発生 - HookWidgetなどはhooks_riverpodを使ってるときだけ変換したい → custom_lintで利用パッケージを知るすべが無い
図解 これらはオプションにしたい しかしcustom_lintからプロジェクトの利用 パッケージを取得できない
remiさんがcustom_lintを修正してくれた
remiさんがcustom_lintを修正してくれた custom_lintの変更 PR https://github.com/invertase/dart_custom_lint/p ull/137 Changelog https://pub.dev/packages/custom_lint_builder/ changelog#033---2023-04-06
custom_lintの補足 - Dart、Flutter用にオリジナルのlintルールを作れる要チェックパッケージ - lintを利用する:custom_lintパッケージ - lintを開発する:custom_lint_builderパッケージ - Invertaseが開発してる -
といいつつほぼremiさんが作ってる? - riverpod_lintの開発の中で改良されてる感があり、 custom_lint_builderを使うときはriverpod_lintが参考になる
無事リリース🥳
無事リリース🥳 機能追加とかすると Changelogに書いてもらえ る 自分でOSSするときも参考にすると良さそうな 運用
おわり - Riverpod関連のWidgetを変換する機能を追加したよ - 今回の実装のPR - https://github.com/rrousselGit/riverpod/pull/2306