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
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
560
ASP.NET Core の OpenAPIサポート
h455h1
0
110
快速入門可觀測性
blueswen
0
500
DMMオンラインサロンアプリのSwift化
hayatan
0
180
PicoRubyと暮らす、シェアハウスハック
ryosk7
0
220
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
590
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
1k
Lookerは可視化だけじゃない。UIコンポーネントもあるんだ!
ymd65536
1
130
Alba: Why, How and What's So Interesting
okuramasafumi
0
210
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
940
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
100
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
Raft: Consensus for Rubyists
vanstee
137
6.7k
How GitHub (no longer) Works
holman
312
140k
A better future with KSS
kneath
238
17k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
360
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
500
A designer walks into a library…
pauljervisheath
205
24k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
113
50k
The World Runs on Bad Software
bkeepers
PRO
66
11k
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 ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ