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.2k
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.5k
DevTools Extension 3分クッキング
daiki1003
0
1k
テストの可読性を支える技術
daiki1003
12
5.2k
YOUTRUSTアプリの構造、暴露してみた
daiki1003
7
3.4k
Other Decks in Programming
See All in Programming
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.3k
color-scheme: light dark; を完全に理解する
uhyo
3
310
『品質』という言葉が嫌いな理由
korimu
0
160
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
6
4k
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
130
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
130
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
110
富山発の個人開発サービスで日本中の学校の業務を改善した話
krpk1900
4
390
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
260
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
780
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
1k
Flutter × Firebase Genkit で加速する生成 AI アプリ開発
coborinai
0
160
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.4k
Building an army of robots
kneath
303
45k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Become a Pro
speakerdeck
PRO
26
5.1k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
A Tale of Four Properties
chriscoyier
158
23k
Done Done
chrislema
182
16k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
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 ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ