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
Flutterだけでテトリス作ってみた
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Aoi Umigishi
February 29, 2024
Programming
240
0
Share
Flutterだけでテトリス作ってみた
第2回Flutter Nightでの登壇資料です。
Aoi Umigishi
February 29, 2024
More Decks by Aoi Umigishi
See All by Aoi Umigishi
iOS 26にアップデートすると実機でのHot Reloadができない?
umigishiaoi
0
490
SliverAppBarはなぜ変化する?~ Sliverを内側から理解する ~
umigishiaoi
0
170
My challenge to add Vision OS support in Flutter
umigishiaoi
0
120
Other Decks in Programming
See All in Programming
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
380
第3木曜LT会 #28
tinykitten
PRO
0
110
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
280
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
220
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
150
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
3
160
TiDBのアーキテクチャから学ぶ分散システム入門 〜MySQL互換のNewSQLは何を解決するのか〜 / tidb-architecture-study
dznbk
1
180
Kingdom of the Machine
yui_knk
2
380
Coding as Prompting Since 2025
ragingwind
0
840
Claude Codeをカスタムして自分だけのClaude Codeを作ろう
terisuke
0
140
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
0
330
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
150
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
490
Amusing Abliteration
ianozsvald
1
160
It's Worth the Effort
3n
188
29k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
260
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
320
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
150
Designing for Timeless Needs
cassininazir
0
200
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
440
Transcript
F l u t t e r だ け で
テ ト リ ス 作 っ て み た F lu t t e r N i ght ���� 年 �� 月 �� 日 Aoi Umigishi
アジェンダ �. 自己紹介 �. 作成したテトリスの紹介 �. 作成ポイント a. テトリスのモデル化 b.
キーボード入力 c. 状態管理 �. まとめ
名前: Aoi Umigishi ( 東 優太 ) SNS 等: 職業:
フリーランスエンジニア (Flutter/TypeScript) 趣味:音楽、ゲーム、 etc ... 自己紹介
作成したテトリスの紹介
作成したテトリスの紹介 特徴: 特徴: �rd Party のパッケージを不使用!
作成ポイント ・テトリスのモデル化 [(false , 黒 ), (true , 紫 ),
(false , 黒 )], [(true , 紫 ), (true , 紫 ), (true , 紫 )] [ ] List<List<PanelModel>> ブロックを PanelModel でモデル化 ブロックを PanelModel でモデル化
作成ポイント ・テトリスのモデル化 移動のロジック 移動後の Block の位置に hasBlock = true のものがないか
チェック なければ移動を実行
作成ポイント ・テトリスのモデル化 移動のロジック 移動後の Block の位置に hasBlock = true のものがないか
チェック あれば移動しない
作成ポイント ・キーボード入力 https://docs.flutter.dev/ui/ interactivity/actions-and-shortcuts Shortcuts, Actions, Focus の � つの
Widget で実現
作成ポイント ・キーボード入力
作成ポイント ・状態管理 親 ゲーム画面 ボタン FieldState 課題 : ゲーム画面の状態をボタンから操作したい currentMino
作成ポイント ・状態管理 親 ゲーム画面 ボタン FieldState 課題 : ゲーム画面の状態をボタンから操作したい
作成ポイント ・状態管理 (StatefulWidget) ゲーム画面 ボタン FieldState 解決方法 : InheritedWidget の利用
TetrisController down (InheritedWidget) _InheritedTetris TetrisController.of(context).fieldState TetrisController.of(context).down
・Flutter だけでテトリスを作りました ・パッケージを使わずとも標準 API で色々できます まとめ ・でも、パッケージはやっぱり便利。感謝。 ・他にも Dart �
の List.indexed とか活用してます ・ リポジトリ見てください!
ご清聴ありがとうございました!