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.2k
DevTools Extension 3分クッキング
daiki1003
0
980
テストの可読性を支える技術
daiki1003
12
5.2k
YOUTRUSTアプリの構造、暴露してみた
daiki1003
7
3.3k
Other Decks in Programming
See All in Programming
cmp.Or に感動した
otakakot
2
140
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
330
Jakarta EE meets AI
ivargrimstad
0
150
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
最新TCAキャッチアップ
0si43
0
140
Outline View in SwiftUI
1024jp
1
330
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
Macとオーディオ再生 2024/11/02
yusukeito
0
370
ヤプリ新卒SREの オンボーディング
masaki12
0
130
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Scaling GitHub
holman
458
140k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Bash Introduction
62gerente
608
210k
A Tale of Four Properties
chriscoyier
156
23k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Automating Front-end Workflow
addyosmani
1366
200k
A Modern Web Designer's Workflow
chriscoyier
693
190k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
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 ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ