Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Dart Macrosに願いを [YOUTRUST x ゆめみ Flutter LT会@渋谷 #4]
Search
tatsubee
December 08, 2023
0
840
Dart Macrosに願いを [YOUTRUST x ゆめみ Flutter LT会@渋谷 #4]
tatsubee
December 08, 2023
Tweet
Share
More Decks by tatsubee
See All by tatsubee
マルチウィンドウ実践ガイド
shoryuyamamoto
0
210
Create Spatial Photo with ImagePresentationComponent
shoryuyamamoto
0
77
pixivのリアーキテクチャにおける The Composable Architecter活用
shoryuyamamoto
0
160
pixivアプリは変化する
shoryuyamamoto
0
970
マルチウィンドウでアプリケーションの表現を拡張する
shoryuyamamoto
1
320
【After iOSDC LT Night〜ピクシブ×日経×タイミー〜】実装!Interactive Widgets
shoryuyamamoto
0
51
SwiftPM マルチモジュール構成への第一歩
shoryuyamamoto
0
2.9k
TCA with UIKit [TCAでわいわいLT会]
shoryuyamamoto
1
1.3k
riverpodを理解したい
shoryuyamamoto
0
150
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
69
Utilizing Notion as your number one productivity tool
mfonobong
2
190
Embracing the Ebb and Flow
colly
88
4.9k
Odyssey Design
rkendrick25
PRO
0
440
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
280
Marketing to machines
jonoalderson
1
4.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
65
Thoughts on Productivity
jonyablonski
73
5k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
90
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Darren the Foodie - Storyboard
khoart
PRO
0
1.9k
Transcript
Presented by 辰べえ 2023.11.04 Presented by 辰べえ Dart Macrosに願いを
自己紹介 • 23新卒 • 福岡生まれ 福岡育ち 東京在住 • 最近やっていること ◦
お絵描き ◦ テニス ◦ iOS 辰べえ iOSエンジニア 自己紹介 • 23新卒 • 福岡生まれ 福岡育ち 東京在住 • 最近やっていること ◦ お絵描き ◦ テニス ◦ iOS 辰べえ iOSエンジニア 2
build_runner使っていますか? 3
build_runnerとは Dartでコードを生成するためのパッケージ build_runnerを活用して作られたパッケージの例 • json_serializable • freezed • openapi_generator などなど 4
build_runnerの課題 • コマンドの実行が必要 _fvm flutter pub run build_runner build –delete-conflicting-outputs_
◦ Hot Reloadの生産性を損ねる • xxx.g.dartが生成されてしまう • コマンドを実行してエラーが出るまで構文のミス に気付けない 5
課題を解決する(かもしれない) Dartの新機能 → 6
7 Dart Macros
Dart Macrosとは Dartで議論が進められている言語機能 https://github.com/dart-lang/language/blob/main/working/macros macroアノテーションをつけることで、コンパイル時 に対応したコードを生やすことができる build_runnerでできることが、より快適にできる 8
Dart Macrosの存在する未来 9
Dart Macrosの存在する未来 • Hot Reloadするだけでほしいコードが生える • 自動生成されたコードはいい感じに隠される ◦ 見たいときにはコードを表示できる •
静的解析で構文のミスを見つけられる 10
(おまけ1) Swift Macrosの活用例 11
12 Swift Macrosの活用例
(おまけ2) 宣伝 13
より快適なFlutterライフを! 14 [宣伝] Flutter Advent Calendar 9日目
より快適なFlutterライフを! 15