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
840
barrel_file_for_flutter.pdf
FlutterのBarrel Fileを使って、importを分かりやすくするための解説をしました!
ashdik
July 24, 2023
Tweet
Share
More Decks by ashdik
See All by ashdik
DevTools Extension 3分クッキング
daiki1003
0
870
テストの可読性を支える技術
daiki1003
12
5k
YOUTRUSTアプリの構造、暴露してみた
daiki1003
7
2.9k
Other Decks in Programming
See All in Programming
GitHub Actionsで泣かないためにやっておきたい設定 / Recommended GHA settings to avoid crying
pinkumohikan
3
560
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
4
1k
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
680
dbtのドメイン分割による データ基盤の改善とDigdagとの連携
sakama
0
440
Exploring the Implementation of “t.Run”, “t.Parallel”, and “t.Cleanup”
akarin
1
110
Elm Form Validation
bkuhlmann
0
510
Ruby Function Composition
bkuhlmann
1
340
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
6
1.1k
Three ways to use AI on Android: The Good, the Bad and the Ugly
marxallski
0
100
Snowflakeで眠ったデータを起こそう!
estie
0
140
新宿ダンジョンを可視化してみた
satoshi7190
3
380
try! Swift Tokyo 初参加報告LT
hinakko2
0
230
Featured
See All Featured
What the flash - Photography Introduction
edds
64
11k
Mobile First: as difficult as doing things right
swwweet
217
8.6k
YesSQL, Process and Tooling at Scale
rocio
165
13k
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.2k
Bash Introduction
62gerente
605
210k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
222
21k
Stop Working from a Prison Cell
hatefulcrawdad
267
19k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
41
4.4k
Making Projects Easy
brettharned
109
5.5k
How to name files
jennybc
65
93k
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 ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ