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
Flutter meetup Tokyo #7
Search
shogo.yamada
January 30, 2019
1
270
Flutter meetup Tokyo #7
shogo.yamada
January 30, 2019
Tweet
Share
More Decks by shogo.yamada
See All by shogo.yamada
Jetpack ComposeへのリファクタリングのTIPS: CustomViewの便利な使い方 / Refactoring TIPS to Jetpack Compose: Useful usage of CustomView
yshogo
0
670
Android StudioのLiveTemplateの便利な使い方 / Android LiveTemplate Method
yshogo
0
1.1k
ZOZOの新規サービス 「FAANS」の開発 Android編/FAAN App Create on Android
yshogo
0
1.3k
PORT_Firebase___Algolia.pdf
yshogo
0
220
Flutter_meetup_tokyo__10.pdf
yshogo
0
5.7k
PORT Firebase x Flutter
yshogo
0
380
ZOZOTech meetup Frontend #10
yshogo
2
1.6k
flutter-meetup.pdf
yshogo
0
51
Potetochips #61
yshogo
1
500
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
73
9.1k
Side Projects
sachag
452
42k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
430
Documentation Writing (for coders)
carmenintech
66
4.5k
What's in a price? How to price your products and services
michaelherold
243
12k
The Cost Of JavaScript in 2023
addyosmani
45
6.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Embracing the Ebb and Flow
colly
84
4.5k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Gamification - CAS2011
davidbonilla
80
5.1k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Transcript
Copyright © ZOZO Technologies, Inc. All Rights Reserved. גࣜձࣾ;0;0ςΫϊϩδʔζ ։ൃ෦
ࢁాঘޗ 8JEHFUੜͷύϑΥʔϚϯε Λվળ͢Δ
ϓϩϑΟʔϧ 5XJUUFS ;0;0ςΫϊϩδʔζ ։ൃ෦ ࢁాঘޗ Copyright © ZOZO Technologies, Inc.
All Rights Reserved. !ZTIPHP (JUIVC !ZTIPHP 'MVUUFSใൃ৴ϒϩά IUUQTOPUFNVTIPHPZBNBEB
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ˓ຊ࠷େڃͷϑΝογϣϯγϣοϐϯάαΠτΞϓϦ ˓
Ҏ্ͷγϣοϓɺ Ҏ্ͷϒϥϯυͷऔΓѻ͍ʢ ݄࣌ʣ ˓ৗ࣌ສҎ্ͷΞΠςϜͱຖฏۉ Ҏ্ͷ৽ண Λܝࡌ ˓ଈૹαʔϏεΪϑτϥοϐϯάαʔϏεπέ͍ͳͲ IUUQ[P[PKQ
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ˓ຊ࠷େڃͷϑΝογϣϯίʔσΟωʔτΞϓϦ ˓
ສμϯϩʔυಥഁɺίʔσΟωʔτߘ૯ສ݅Ҏ ্ʢͱʹ݄࣌ʣ ˓શੈքʢ"QQ4UPSF(PPHMFQMBZ͕ར༻ՄೳͳશͯͷࠃʣͰμ ϯϩʔυ͕Մೳ ˓ສਓҎ্ͷϑΥϩϫʔΛ࣋ͭϢʔβʔʢ8&"3*45"ʣੜ IUUQTXFBSKQ
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ˓ʮ;0;046*5ʯͰܭଌͨ͠ମܕσʔλΛͱʹɺҰਓͻͱΓͷମ ܕʹ߹ͬͨʮ͋ͳͨαΠζʯͷΞΠςϜ
˓ʮڀۃͷϑΟοτײʯΛ࣮ݱͨ͠ϕʔγοΫΞΠςϜΛఏڙ άϩʔόϧαΠτʮ;0;0DPNʯͰւ֎ల։ ˓ΞΠςϜ̩γϟπɺσχϜύϯπɺγϟπɺϏδωεεʔπɺ ωΫλΠɺϘʔμʔ̩γϟπɺକΫϧʔωοΫ̩γϟπͳͲ IUUQ[P[PKQQC
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ˓͕ࣾಠࣗʹ։ൃͨ͠࠾ੇ༻ϘσΟʔεʔπ ˓શମʹࢪ͞ΕͨυοτϚʔΧʔΛεϚʔτϑΥϯΧϝϥͰࡱ
Ө͢Δ͜ͱͰɺମܕσʔλΛܭଌ ˓ܭଌͨ͠ମܕσʔλɺॠ࣌ʹ%ϞσϧԽ͞Εɺ;0;0508/Ξ ϓϦʹอଘɻ%Ϟσϧ͋ΒΏΔ֯ʹಈ͔͢͜ͱ͕Ͱ͖ɺମܕΛ νΣοΫ͢Δ͜ͱ͕Մೳ IUUQ[P[PKQ[P[PTVJU
Copyright © ZOZO Technologies, Inc. All Rights Reserved. εϙϯαʔϒʔεग़͠·͢ʂ
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ࠓ͢͜ͱ ɾͳͥΔͷ͔
ɾύϑΥʔϚϯε͕ѱ͘ͳΔݪҼʁ ɾύϑΥʔϚϯεͷଌఆํ๏ ɾύϑΥʔϚϯε͕ѱ͘ͳΔΞϯνύλʔϯ ɾ·ͱΊ ɾ࠷ޙʹ
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ͳͥΔͷ͔ ઌνϟοτΞϓϦΛϦϦʔε͠·ͨ͠ɻ
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ͳͥΔͷ͔ Androidͷ֨҆εϚϗͰಈ͔͢ͱͨΒͱΧΫπΫɻ
ݪҼΛௐࠪͯ͠վળ͍ͨ͠
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯε͕ѱ͘ͳΔݪҼʁ https://docs.flutter.io/flutter/widgets/StatefulWidget-class.html#performance-considerations
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯε͕ѱ͘ͳΔݪҼʁ
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯε͕ѱ͘ͳΔݪҼʁ Widgetͷੜճଟ͍
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯε͕ѱ͘ͳΔݪҼʁ Widgetͷੜճଟ͍
→WidgetੜճΛͰ͖Δ͚ͩݮΒ͢ ʢཧ࠷ॳͷҰճ͚ͩ)
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεͷଌఆํ๏ ᶃ
ᶄ ᶅ ᶆ Widget͕ͲΕ͘Β͍ ࠶ੜ͍ͯ͠Δͷ͔ΈΕΔ
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεͷଌఆํ๏ γϯϓϧͳListView
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεͷଌఆํ๏ վળલ
վળޙ
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips ɾsetState({})ΛΘͳ͍
ɾStateless WidgetΛ͏ ɾมߋ͕ͳ͍WidgetʹconstΛ͚ͭΔ
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips setState({})Λଟ༷͍ͯ͠Δ
ɾStatefullWidgetͷbuild͔ΒWidgetΛ ࠶ੜͯ͠͠·͏ ɾجຊతʹsetState({})Θͳ͍Α͏ʹ࣮ ͢Δ͖
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips FutureBuilder
OR StreamBuilderΛ͏
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips setState({})Λ͏໘
ɾBottomNavigationɺSidebarͳͲɺ ҙਤతʹbuildԼͷWidgetΛॻ͖͑Δͱ ͖͚ͩʹ͏
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips ͱ͍͑ɺsetState({})͍͍ͨɺɺɺ
ɾͲ͏͍͍ͯͨ͠߹ɺมԽ͠ͳ͍෦Λ Stateless WidgetʹΓग़ͯ͠buildԼΛখ͘͢͞ Δ
Copyright © ZOZO Technologies, Inc. All Rights Reserved. StatelessWidget StatefullWidget
มԽ͠ͳ͍Widget
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips Stateless
WidgetΛ͏ ɾมԽ͠ͳ͍෦ → Stateless Widgetʹ͢Δ ɾมԽ͢Δ෦͚ͩ → Statefull Widgetʹ͢Δ
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips มߋ͕ͳ͍WidgetʹconstΛ͚ͭΔ
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ·ͱΊ ɾsetState({})Ͱ͖Δ͚ͩ͏Θͳ͍
ɹ̍ɺ͏ͱ͖ҙਤతʹWidgetΛมߋ͢Δͱ͖ ɹ̎ɺFutureBuilder StreamBuilderΛ͏ ɹ̏ɺ͏߹Stateless WidgetʹΓग़ͯ͠ buildԼΛখ͘͢͞Δ
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ·ͱΊ ɾStateless
WidgetͬͯҰੜͨ͠Βมߋͳ͍ ͷΛΘ͚Δ ɾconstΛͬͯɺWidgetΛΩϟογϡ͢Δ
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ࠷ޙʹ ɾͥͻʮKyatʯΛμϯϩʔυ͍ͯͩ͘͠͞
Copyright © ZOZO Technologies, Inc. All Rights Reserved. ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠