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
[ABCD2021Winter]Flutterアプリ開発実践
Search
Kenichi Kambara
December 11, 2021
Technology
2
250
[ABCD2021Winter]Flutterアプリ開発実践
ABCD 2021 Winterの「Flutterアプリ開発実践」のセッション資料です。
#abcd2021w #androidjp #flutterjp
Kenichi Kambara
December 11, 2021
Tweet
Share
More Decks by Kenichi Kambara
See All by Kenichi Kambara
[mobile #15]UX Improvements on Flutter Apps Part 5
korodroid
0
21
[ABC2024Summer]Flutter UX Improvements + α
korodroid
0
460
[YUMEMI.grow Mobile #14]Wear OS Recap from I/O 2024 [short version]
korodroid
0
34
[mobile #14]UX Improvements on Flutter Apps Part 4
korodroid
0
41
[potatotips #87]UX Improvements on Flutter Apps Part 3
korodroid
0
43
[YUMEMI.grow Mobile #12]UX Improvements on Flutter Apps Part 2
korodroid
0
78
[potatotips #86]UX Improvements on Flutter Apps Part 1
korodroid
0
65
Supporting RTL on Flutter Apps 7 Development Tips
korodroid
0
84
[DevFestKC]Go Global with Flutter Apps 101
korodroid
0
82
Other Decks in Technology
See All in Technology
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
【若手エンジニア応援LT会】ソフトウェアを学んできた私がインフラエンジニアを目指した理由
kazushi_ohata
0
150
TypeScript、上達の瞬間
sadnessojisan
46
13k
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
37
12k
AGIについてChatGPTに聞いてみた
blueb
0
130
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
120
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
550
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
130
Featured
See All Featured
Embracing the Ebb and Flow
colly
84
4.5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Designing the Hi-DPI Web
ddemaree
280
34k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Designing Experiences People Love
moore
138
23k
Visualization
eitanlees
145
15k
A designer walks into a library…
pauljervisheath
204
24k
GraphQLとの向き合い方2022年版
quramy
43
13k
How to Ace a Technical Interview
jacobian
276
23k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Transcript
2021.12.11 ਆݪ ݈Ұ (@korodroid) FlutterΞϓϦ։ൃ࣮ફ
About me •Mobile App Development •Speeches (e.g. 9 International confs.)
•Writings (e.g. 6 Dev Books) •[Of fi cial] Evangelist at NTT TechnoCross •[Private] iplatform.org ਆݪɹ݈Ұ (@korodroid)
About my product (Private works) Sekaiphone(Kotlin/Swift+Firebase) MyToDo(Flutter+Firebase)
•ԡ͓͖͍͑ͯͨ͞Tips •࣮ફςΫχοΫ Agenda
ԡ͓͖͍͑ͯͨ͞Tips
Tips 1. ϥΠϒςϯϓϨʔτͷ׆༻
Tips 1. ϥΠϒςϯϓϨʔτͷ׆༻ class MainPage extends StatelessWidget { @override Widget
build(BuildContext context) { return Container(); } } //Before: ΟδΣοτΛશͯखॻ͖ //After: stless/stful/stanim+[Tab]Ωʔ
ΑΓଟ͘ͷςϯϓϨʔτ Tips 1. ϥΠϒςϯϓϨʔτͷ׆༻
Tips 1. ϥΠϒςϯϓϨʔτͷ׆༻ සग़͢ΔίʔυɺࣗલςϯϓϨʔτԽ͓͢͢Ί
Tips 2. ίʔυΞγετػೳͷ׆༻
Widgetͷબ& ALT+ENTER Tips 2. ίʔυΞγετػೳͷ׆༻
Tips 3. FlutterGenͷ׆༻ ΞηοτɾϑΥϯτɾΧϥʔͷཧࢧԉ // Before class MainPage extends StatelessWidget
{ @override Widget build(BuildContext context) { return Image.asset("assets/images/chara1.png"); } } // After ref. FlutterGen: https://github.com/FlutterGen/ fl utter_gen
࣮ફςΫχοΫ
Android: Kotlin, iOS: Swift Android/iOS:Flutter എܠ. FlutterͷҠߦ
ૺ۰ͨ͠ͱରࡦ 1. ෳࡶͳUI 2. ঢ়ଶཧ 3. ϥϯλΠϜύʔϛογϣϯ
1. ෳࡶͳUI Ͳ͏࣮ͬͯݱ͢Δʁ •Step1. ը૾ͷՃ •Step2. ը૾ͷॏͶ߹Θͤ •Step3. Ґஔ߹Θͤ
Ϧιʔε … 100 images
Step1. ը૾ͷՃ(with FlutterGen) flutter: assets: - assets/images/imgKokkiLeftl.png # - assets/images/
pubspec.yaml
Step2. ը૾ͷॏͶ߹Θͤ (How?) ref. Stack: https://api. fl utter.dev/ fl utter/widgets/Stack-class.html
+ +
Widget _getKokkiImage() { return Stack( children: [ Assets.images.kokkiEn.image( height: 80.0,
), Assets.images.imgKokkiLeftl.image( height: 80.0, ), Assets.images.imgSpeak.image( height: 24, ), ], ); ref. Stack: https://api. fl utter.dev/ fl utter/widgets/Stack-class.html Step2. ը૾ͷॏͶ߹Θͤ
Step3. Ґஔ߹Θͤ //Before Widget _getKokkiImage() { return Stack( children: [
Assets.images.kokkiEn.image( height: 80.0, ), Assets.images.imgKokkiLeftl.image( height: 80.0, ), Assets.images.imgSpeak.image( height: 24, ), ], );
Step3. Ґஔ߹Θͤ (How?) ref. Positioned: https://api. fl utter.dev/ fl utter/widgets/Positioned-class.html
// After Widget _getKokkiImage() { return Stack( children: [ Assets.images.kokkiEn.image(
height: 80.0, ), Assets.images.imgKokkiLeftl.image( height: 80.0, ), Positioned( left: 4.0, top: 60.0, child: Assets.images.imgSpeak.image( height: 24, ), ), ), ], ); } Step3. ϨΠΞτˍҐஔ߹Θͤ
2. ঢ়ଶཧ ͚ͩ͜͜ߋ৽
2. ঢ়ଶཧ •StatefulWidget •Provider (InheritedWidget) •Riverpod •Bloc •GetX •…
ಛΛཧղͯࣗ͠ͷߟ͑Ͱબ͢Δ͜ͱ͕େ
2. ঢ়ଶཧ •StatefulWidget •Provider (InheritedWidget) •Riverpod •Bloc •GetX •…
ಛΛཧղͯࣗ͠ͷߟ͑Ͱબ͢Δ͜ͱ͕େ
ྫ. GetXΛ༻͍ͨঢ়ଶཧ ൺֱతγϯϓϧʹར༻Մೳ // Before Text(‘Χϯλʔ’), Text("$count"), // After
class MainController extends GetxController { var count = 0.obs; increment() => count++; } [View]main_view.dart [Controller]main_contoroller.dart // After final MainController c = Get.put(MainController()); Text(‘Χϯλʔ’), Obx(() => Text(“${c.count}”)),
GetXͷศརػೳ ͦͷଞʹଟ͘ͷศརػೳ Get.to(NextScreen()); Get.toNamed(‘/details'); Get.back(); ը໘ભҠ(ൈਮ) Get.snackbar('͓Βͤ', ‘৽ணΫʔϙϯ͕͋Γ·͢ɻ'); Get.defaultDialog(
title: "֬ೝ", content: Text("ࠓ͙͢ɺϢʔβొ͠·͔͢ʁ"), confirm: TextButton( child: Text("Ok"), onPressed: () => print("OK࣌ͷॲཧ"), )); ϢʔςΟϦςΟ(ൈਮ) ※↑Ҏ֎ʹ͞·͟·ͳػೳ͕ఏڙ͞Ε͍ͯ·͢ɻ
3. ϥϯλΠϜύʔϛογϣϯ
ंྠͷ࠶ൃ໌ͷલʹ https://pub.dev/
My choice: permission_handler ϥΠϒϥϦͷՃ ϥΠϒϥϦͷΠϯϙʔτ
ྫ. ϥϯλΠϜύʔϛογϣϯͷར༻ཁٻ // ϚΠΫػೳͷར༻ύʔϛογϣϯͷཁٻ var status = await Permission.microphone.request(); औಘͰ͖Δ݁Ռͷྫ
- Granted - Denied - PermanentlyDenied - Restricted
Conclusion •Tipsˍ࣮ફςΫχοΫΛ׆༻ͯ͠ޮతͳ։ൃΛʂ •ࣗͨͪͷϕλʔϓϥΫςΟεΛฤΈग़͢ͷ͕͓͢͢Ίʂ •FlutterͷੈքΓ্͍͖͛ͯ·͠ΐ͏🏃 ref.1 : Twitter @korodroid ref.2
: Speaker Deck https://speakerdeck.com/korodroid/
Please let me know if you have any requests
such as technical speeches, technical writings and so on. Facebook:http://fb.com/kanbara.kenichi Twitter:@korodroid LinkedIn:http://www.linkedin.com/in/korodroid Thank you so much