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
[NTT Tech Conference]Flutterアプリ開発スタートアップwithTips
Search
Kenichi Kambara
February 26, 2021
Technology
0
760
[NTT Tech Conference]Flutterアプリ開発スタートアップwithTips
This is my presentation file on NTT Tech Conference 5.
#NTTtech
#flutterjp
#flutter
Kenichi Kambara
February 26, 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
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
5
590
元旅行会社の情シス部員が教えるおすすめなre:Inventへの行き方 / What is the most efficient way to re:Invent
naospon
2
330
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
130
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
470
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
1
2.3k
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
410
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
360
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
950
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
190
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
200
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
iOS/Androidで同じUI体験をネ イティブで作成する際に気をつ けたい落とし穴
fumiyasac0921
1
110
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
For a Future-Friendly Web
brad_frost
175
9.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Teambox: Starting and Learning
jrom
133
8.8k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
GitHub's CSS Performance
jonrohan
1030
460k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Transcript
2021.02.26 Kenichi Kambara (@korodroid) FlutterΞϓϦ։ൃελʔτΞοϓ with Tips
About me •Mobile App Development •Speeches (e.g. 9 International confs.)
•Writings (e.g. 5 Dev Books) •[Official] Evangelist at NTT TechnoCross •[Private] iplatform.org Kenichi Kambara (@korodroid)
About my product (Private works) Sekaiphone(Kotlin/Swift+Firebase) MyToDo(Flutter+Firebase)
•Flutter֓ཁ •Flutterͷ͡Ίํ •ޮతͳ։ൃͷਐΊํ(Tipsू) Agenda
Flutter֓ཁ
Flutter ڞ௨ͷιʔεͰiOS/Android͚ΞϓϦΛ ։ൃͰ͖ΔSDK(ΫϩεϓϥοτϑΥʔϜ) ※σεΫτοϓ/WebରԠਐߦத
Flutterͷಛ 1.ඒ͍͠UI/ߴ͍࣮ߦੑೳ 2.ߴ͍։ൃޮ 3.ݴޠDart
1.ඒ͍͠UI/ߴ͍࣮ߦੑೳ https://flutter.dev/showcase iOS/Android͚ͷࣗલUI(≠ϥούʔ)
2.ߴ͍։ൃޮ ίʔυมߋΛଈө(Hot Reload)
3.ݴޠDart Java/Java ScriptܦݧऀʹೃછΈ͍͢ݴޠ(UI࡞ΓDart) import 'package:flutter/material.dart'; void main() { runApp( Center(
child: Text( '͜ΜʹͪɺFlutter', textDirection: TextDirection.ltr, ), ), ); }
Flutterͷ͡Ίํ
·ͣײ֮Λ௫Ή (࿅शʹ͓͢͢Ί) ։ൃڥ 1. IDEΛར༻͢Δํ๏ •Android Studio •Visual Studio Code
•IntelliJ IDEA 2. IDEΛར༻͠ͳ͍ํ๏ •Flutter Studio &DartPad ͍׳Ε͍ͯΕ ࠷ॳ͔Βͪ͜ΒͰ
·ͣײ֮Λ௫Ή (࿅शʹ͓͢͢Ί) ։ൃڥ 1. IDEΛར༻͢Δํ๏ •Android Studio •Visual Studio Code
•IntelliJ IDEA 2. IDEΛར༻͠ͳ͍ํ๏ •Flutter Studio &DartPad ͍׳Ε͍ͯΕ ࠷ॳ͔Βͪ͜ΒͰ
(ຊདྷDartͰUI࡞Γ)GUIπʔϧΛͬͯɺUIσβΠϯՄೳ 1. ը໘Λ࡞Δ(Flutter Studio)
Web্ͰDartίʔσΟϯά&FlutterʹରԠ 2. ࣮ߦ͢Δ(DartPad)
·ͣײ֮Λ௫Ή (࿅शʹ͓͢͢Ί) ։ൃڥ 1. IDEΛར༻͢Δํ๏ •Android Studio •Visual Studio Code
•IntelliJ IDEA 2. IDEΛར༻͠ͳ͍ํ๏ •Flutter Studio &DartPad ͍׳Ε͍ͯΕ ࠷ॳ͔Βͪ͜ΒͰ
։ൃڥߏஙˠΞϓϦ࣮ߦ͕ͬͭΓলུ ʢৄࡉެࣜαΠτͰ🙇ʣ
ೖ࣌ʹԡ͍͑ͨ͞ϙΠϯτ •FlutterΞϓϦͷϑΝΠϧߏ •ը໘ͷ࡞Γํ •ϏδωεϩδοΫͷޮతͳ࣮
FlutterΞϓϦͷϑΝΠϧߏ ιʔείʔυ(*.dart) •ϥΠϒϥϦఆٛ •Ϧιʔεఆٛ(ը૾ͳͲ)
ը໘ͷ։ൃDart(LayoutXML, StoryBoard) ը໘ͷ࡞Γํ import 'package:flutter/material.dart'; void main() => runApp(MyApp());
class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Welcome to Flutter', home: Scaffold( appBar: AppBar( title: Text('͡ΊͯͷFlutter'), ), body: Center( child: Text('͜ΜʹͪɺFlutter'), ), ), ); } }
એݴతUIϑϨʔϜϫʔΫ Hello Flutterͷίʔυղઆ import 'package:flutter/material.dart'; void main() => runApp(MyApp());
class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Welcome to Flutter', home: Scaffold( appBar: AppBar( title: Text('͡ΊͯͷFlutter'), ), body: Center( child: Text('͜ΜʹͪɺFlutter'), ), ), ); } }
πϦʔߏͰେ͖ͳཁૉˠখ͞ͳཁૉͷॱংͰ ߏཁૉશͯWidget(ΟδΣοτ) Text AppBar Body Scaffold Text Center
StateΛར༻ͯ͠ঢ়ଶཧ [Ԡ༻]ಈతͳը໘ߋ৽ˠ(·ͣ)StatefulWidget import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class
MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: MyHomePage(title: 'Welcome to Flutter'), ); } } class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key); final String title; @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { int _counter = 0; void _incrementCounter() { setState(() { _counter++; }); } …(লུ)…
ϏδωεϩδοΫͷޮతͳ࣮ https://pub.dev/ ंྠͷൃ໌લʹʮύοέʔδʯௐࠪ
ྫ͑ɺKey-Valueܗࣜͷσʔλอଘ “sharedpreference”Ͱݕࡧ 3 1 2 pubspec.yamlͷఆٛํ๏ Πϯετʔϧํ๏ (IDEͳΒಉظϘλϯԡ͚ͩ͢) ϥΠϒϥϦͷΠϯϙʔτ
“^0.5.8” Android StudioͰͷૢ࡞ 1 2
ύοέʔδΛར༻࣮ͨ͠ྫ import 'package:shared_preferences/shared_preferences.dart'; _saveSampleData(String value) async { SharedPreferences prefs
= await SharedPreferences.getInstance(); await prefs.setString('key1', value); }
Flutterೖ࣌ʹ͓͍͑ͨ͞Dartཁૉ • _ (privateʹ૬) • https://dart.dev/guides/language/language-tour#libraries-and-visibility • .. (Χεέʔυه๏)
• https://dart.dev/guides/language/language-tour#cascade-notation- • … (Spreadԋࢉࢠ) • https://dart.dev/guides/language/language-tour#spread-operator • Future / Stream (ඇಉظॲཧ) • https://dart.dev/tutorials/language/streams ref. Dart Official Site https://dart.dev/
ޮతͳ։ൃͷਐΊํ(Tipsू)
FlutterΞϓϦ։ൃͷߴԽ ίʔσΟϯάฤ ศརϓϥάΠϯฤ ※ࠓճAndroid StudioΛར༻͠·͢ɻ
ίʔσΟϯάฤ
[Before]ΟδΣοτΛશͯखॻ͖ class MainPage extends StatelessWidget { @override Widget build(BuildContext context)
{ return Container(); } } // Stateless Widget
stless/stfull/stanim+[Tab] Key [After 1] ϥΠϒςϯϓϨʔτͷ׆༻
[After 1] ϥΠϒςϯϓϨʔτͷ׆༻
[After 2] Flutter Snippets ΑΓଟ͘ͷςϯϓϨʔτ
[After 3] ࣗલςϯϓϨʔτ Α͘͏ͷɺࣗͰ᪳ͳ͘ొʂ
Ϣʔεέʔε:ը໘ͷվ
Select Widget & ALT+ENTER [After 4] ίʔυΞγετػೳͷ׆༻
ศརϓϥάΠϯฤ
[Plugin 1] FlutterGen ΞηοτɾϑΥϯτɾΧϥʔͷཧࢧԉ [wasabeef͞Μ]https://github.com/FlutterGen/flutter_gen // Before class MainPage extends
StatelessWidget { @override Widget build(BuildContext context) { return Image.asset("assets/images/chara1.png"); } } // After
[Plugin 2] Flutter Enhancement Suite ύοέʔδͷಋೖࢧԉ [Marius Höfler͞Μ]https://plugins.jetbrains.com/plugin/12693-flutter-enhancement-suite
[Plugin 3] FlutterJsonBeanFactory JSONͷར༻ࢧԉ [zhangruiyu͞Μ]https://plugins.jetbrains.com/plugin/11415-flutterjsonbeanfactory
•ϝϯςφϯε͠қ͍UIͷ࡞Γํ ʢ֊Λਂ͘͠ա͗ͳ͍Α͏ʹϩδοΫׂʣ •ΞϓϦͷঢ়ଶཧ ɹ(Provider/Riverpod/BLoC) [Ԡ༻]࣍ʹԡ͍͑ͨ͞ϙΠϯτ
Conclusion •1ιʔεͰAndroid/iOS+αΞϓϦ։ൃ •ϓϩμΫγϣϯద༻Մೳ •TipsΛϑϧ׆༻ͯ͠ޮతͳ։ൃΛʂ
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