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
barrel_file_for_flutter.pdf
Search
ashdik
July 24, 2023
Programming
1
1.1k
barrel_file_for_flutter.pdf
FlutterのBarrel Fileを使って、importを分かりやすくするための解説をしました!
ashdik
July 24, 2023
Tweet
Share
More Decks by ashdik
See All by ashdik
4年間変わらなかった YOUTRUSTのアーキテクチャ
daiki1003
3
1.4k
DevTools Extension 3分クッキング
daiki1003
0
990
テストの可読性を支える技術
daiki1003
12
5.2k
YOUTRUSTアプリの構造、暴露してみた
daiki1003
7
3.3k
Other Decks in Programming
See All in Programming
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.6k
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
140
talk-with-local-llm-with-web-streams-api
kbaba1001
0
180
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
270
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
180
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
700
CSC509 Lecture 14
javiergs
PRO
0
140
CSC305 Lecture 25
javiergs
PRO
0
130
あれやってみてー駆動から成長を加速させる / areyattemite-driven
nashiusagi
1
200
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
120
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
Jakarta EE meets AI
ivargrimstad
0
230
Featured
See All Featured
Building Applications with DynamoDB
mza
91
6.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Gamification - CAS2011
davidbonilla
80
5.1k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Docker and Python
trallard
42
3.1k
Embracing the Ebb and Flow
colly
84
4.5k
Code Reviewing Like a Champion
maltzj
520
39k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Designing Experiences People Love
moore
138
23k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
Transcript
FlutterͷBarrel Fileʹ ͍ͭͯ 2023/07/24 Daiki Asahi (ashdik) 1
ேେथˏ 5XJUUFSɿ!EBJLJ 'MVUUFSྺɿϲ݄ ϒϩάɿIUUQTCMPHEBMUNF
࣍ ɾBarrel Fileͱʁ ɾimportॏཁͳͷ͔ʁ ɾexportΩʔϫʔυ ɾBarrel Fileͷ࡞Γํ 3
࣍ ɾBarrel Fileͱʁ ɾimportॏཁͳͷ͔ʁ ɾexportΩʔϫʔυ ɾBarrel Fileͷ࡞Γํ 4
Barrel Fileͱʁ 5 importΛ·ͱΊͨϑΝΠϧ 5
࣍ ɾBarrel Fileͱʁ ɾimportॏཁͳͷ͔ʁ ɾexportΩʔϫʔυ ɾBarrel Fileͷ࡞Γํ 6
7 importจͷॏཁੑ ͲͷϑΥϧμʹґଘ͍ͯ͠Δ͔ʁ 7
υϝΠϯ ͲͷυϝΠϯ͕ͲͷυϝΠϯΛ͍ͬͯΔ͔ ϨΠϠʔ ٯࢀরආ͚ͯɺґଘؔΛҰํʹ 8 importจͷॏཁੑ ͲͷϑΥϧμʹґଘ͍ͯ͠Δ͔ʁ 8
υϝΠϯ ͲͷυϝΠϯ͕ͲͷυϝΠϯΛ͍ͬͯΔ͔ ϨΠϠʔ ٯࢀরආ͚ͯɺґଘؔΛҰํʹอͪ·͢ɻ 9 importจͷॏཁੑ ͲͷϑΥϧμʹґଘ͍ͯ͠Δ͔ʁ 9
υϝΠϯ ͲͷυϝΠϯ͕ͲͷυϝΠϯΛ͍ͬͯΔ͔ ϨΠϠʔ ٯࢀরආ͚ͯɺґଘؔΛҰํʹอͪ·͢ɻ 10 importจͷॏཁੑ ͲͷϑΥϧμʹґଘ͍ͯ͠Δ͔ʁ 10 YOUTRUSTΞϓϦͷߏɺ࿐ͯ͠Έͨ more
infoʁ https://speakerdeck.com/daiki1003/youtrustapurifalsegou-zao-bao-lu-sitemita
υϝΠϯ ͲͷυϝΠϯ͕ͲͷυϝΠϯΛ͍ͬͯΔ͔ ϨΠϠʔ ٯࢀরආ͚ͯɺґଘؔΛҰํʹ 11 importจͷॏཁੑ ͲͷϑΥϧμʹґଘ͍ͯ͠Δ͔ʁ 11
υϝΠϯ ͲͷυϝΠϯ͕ͲͷυϝΠϯΛ͍ͬͯΔ͔ ϨΠϠʔ ٯࢀরආ͚ͯɺґଘؔΛҰํʹ 12 importจͷॏཁੑ ͲͷϑΥϧμʹґଘ͍ͯ͠Δ͔ʁ 12 FlutterYOUTRUSTΞϓϦΛࢧ͑ΔϨΠϠʔߏ more
infoʁ https://tech.youtrust.co.jp/entry/app-layer-flutter
࣍ ɾBarrel Fileͱʁ ɾimportॏཁͳͷ͔ʁ ɾexportΩʔϫʔυ ɾBarrel Fileͷ࡞Γํ 13 13
DartϥΠϒϥϦͷҰ෦Λɺ ଞͷϥΠϒϥϦʹެ։͢ΔͨΊʹ༻͢Δ 14 exportΩʔϫʔυ exportΩʔϫʔυͱʁ 14
࣍ ɾBarrel Fileͱʁ ɾimportॏཁͳͷ͔ʁ ɾexportΩʔϫʔυ ɾBarrel Fileͷ࡞Γํ 15 15
16 Barrel Fileͷ࡞Γํ 16 lib/comic ᵓᴷᴷ model ɹ ᵓᴷᴷ attack_on_titan.dart
ɹ ᵓᴷᴷ hunter_hunter.dart ɹ ᵓᴷᴷ kingdom.dart ɹ ᵋᴷᴷ one_piece.dart
17 Barrel Fileͷ࡞Γํ 17 lib/comic ᵓᴷᴷ model ᴹ ᵓᴷᴷ attack_on_titan.dart
ᴹ ᵓᴷᴷ hunter_hunter.dart ᴹ ᵓᴷᴷ kingdom.dart ᴹ ᵋᴷᴷ one_piece.dart ᵋᴷᴷ model.dart
18 Barrel Fileͷ࡞Γํ 18 Before After
19 Barrel Fileͷ࡞Γํ 19 શ෦ख࡞Γʁ
20 Barrel Fileͷ࡞Γํ 20 શ෦ख࡞Γʁ εΫϦϓτͷར༻ Dart Barrel File Generator
21 importจͷॏཁੑ ͍/গͳ͍͕ਖ਼ٛͰͳ͍ 21
lib.dartʁ 22 importจͷॏཁੑ ͍/গͳ͍͕ਖ਼ٛͰͳ͍ 22
23 ·ͱΊ Barrel FileΛ͏͜ͱͰimportΛߏԽग़དྷΔ 23 importจͲͷϑΝΠϧ͕ͲͷϑΝΠϧʹґଘ͍ͯ͠Δ͔ΛΔࢦඪͰ͋Δ ༻๏ɾཁྖΛकͬͯਖ਼͓͍͍ͩ͘͘͠͞
24 24 ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ