Flutter_meetup__7.pdf

E222076ea6b90ae53c2bc68c8a4e01f1?s=47 shogo.yamada
February 09, 2019
3.8k

 Flutter_meetup__7.pdf

E222076ea6b90ae53c2bc68c8a4e01f1?s=128

shogo.yamada

February 09, 2019
Tweet

Transcript

  1. Copyright © ZOZO Technologies, Inc. All Rights Reserved. גࣜձࣾ;0;0ςΫϊϩδʔζ ։ൃ෦

    ࢁాঘޗ 8JEHFUੜ੒ͷύϑΥʔϚϯε Λվળ͢Δ
  2. ϓϩϑΟʔϧ 5XJUUFS ;0;0ςΫϊϩδʔζ ։ൃ෦ ࢁాঘޗ Copyright © ZOZO Technologies, Inc.

    All Rights Reserved. !ZTIPHP (JUIVC !ZTIPHP 'MVUUFS৘ใൃ৴ϒϩά IUUQTOPUFNVTIPHPZBNBEB
  3. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ˓೔ຊ࠷େڃͷϑΝογϣϯγϣοϐϯάαΠτΞϓϦ ˓

    Ҏ্ͷγϣοϓɺ Ҏ্ͷϒϥϯυͷऔΓѻ͍ʢ ೥݄຤࣌఺ʣ ˓ৗ࣌ສ఺Ҏ্ͷ঎඼ΞΠςϜ਺ͱຖ೔ฏۉ ఺Ҏ্ͷ৽ண঎ ඼Λܝࡌ ˓ଈ೔഑ૹαʔϏεΪϑτϥοϐϯάαʔϏεπέ෷͍ͳͲ IUUQ[P[PKQ
  4. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ˓೔ຊ࠷େڃͷϑΝογϣϯίʔσΟωʔτΞϓϦ ˓

    ສμ΢ϯϩʔυಥഁɺίʔσΟωʔτ౤ߘ૯਺͸ສ݅Ҏ ্ʢͱ΋ʹ೥݄຤࣌఺ʣ ˓શੈքʢ"QQ4UPSF(PPHMFQMBZ͕ར༻ՄೳͳશͯͷࠃʣͰμ ΢ϯϩʔυ͕Մೳ ˓ສਓҎ্ͷϑΥϩϫʔΛ࣋ͭϢʔβʔʢ8&"3*45"ʣ΋஀ੜ IUUQTXFBSKQ
  5. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ˓ʮ;0;046*5ʯͰܭଌͨ͠ମܕσʔλΛ΋ͱʹɺҰਓͻͱΓͷମ ܕʹ߹ͬͨʮ͋ͳͨαΠζʯͷΞΠςϜ

    ˓ʮڀۃͷϑΟοτײʯΛ࣮ݱͨ͠ϕʔγοΫΞΠςϜΛఏڙ άϩʔόϧαΠτʮ;0;0DPNʯͰւ֎ల։ ˓ΞΠςϜ̩γϟπɺσχϜύϯπɺγϟπɺϏδωεεʔπɺ ωΫλΠɺϘʔμʔ̩γϟπɺ௕କΫϧʔωοΫ̩γϟπͳͲ IUUQ[P[PKQQC
  6. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ˓౰͕ࣾಠࣗʹ։ൃͨ͠࠾ੇ༻ϘσΟʔεʔπ ˓શମʹࢪ͞ΕͨυοτϚʔΧʔΛεϚʔτϑΥϯΧϝϥͰ౓ࡱ

    Ө͢Δ͜ͱͰɺମܕσʔλΛܭଌ ˓ܭଌͨ͠ମܕσʔλ͸ɺॠ࣌ʹ%ϞσϧԽ͞Εɺ;0;0508/Ξ ϓϦʹอଘɻ%Ϟσϧ͸͋ΒΏΔ֯౓ʹಈ͔͢͜ͱ͕Ͱ͖ɺମܕΛ ౓νΣοΫ͢Δ͜ͱ͕Մೳ IUUQ[P[PKQ[P[PTVJU
  7. Copyright © ZOZO Technologies, Inc. All Rights Reserved. εϙϯαʔϒʔεग़͠·͢ʂ

  8. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ࠓ೔࿩͢͜ͱ ɾͳͥ΍Δͷ͔

    ɾύϑΥʔϚϯε͕ѱ͘ͳΔݪҼ͸ʁ ɾύϑΥʔϚϯεͷଌఆํ๏ ɾύϑΥʔϚϯε͕ѱ͘ͳΔΞϯνύλʔϯ ɾ·ͱΊ ɾ࠷ޙʹ
  9. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ͳͥ΍Δͷ͔ ઌ೔νϟοτΞϓϦΛϦϦʔε͠·ͨ͠ɻ

  10. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ͳͥ΍Δͷ͔ Androidͷ֨҆εϚϗͰಈ͔͢ͱ΍ͨΒͱΧΫπΫɻ

    ݪҼΛௐࠪͯ͠վળ͍ͨ͠
  11. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯε͕ѱ͘ͳΔݪҼ͸ʁ https://docs.flutter.io/flutter/widgets/StatefulWidget-class.html#performance-considerations

  12. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯε͕ѱ͘ͳΔݪҼ͸ʁ

  13. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯε͕ѱ͘ͳΔݪҼ͸ʁ Widgetͷੜ੒ճ਺ଟ͍

  14. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯε͕ѱ͘ͳΔݪҼ͸ʁ Widgetͷੜ੒ճ਺ଟ͍

    →Widgetੜ੒ճ਺ΛͰ͖Δ͚ͩݮΒ͢ ʢཧ૝͸࠷ॳͷҰճ͚ͩ)
  15. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεͷଌఆํ๏ ᶃ

    ᶄ ᶅ ᶆ Widget͕ͲΕ͘Β͍ ࠶ੜ੒͍ͯ͠Δͷ͔ΈΕΔ
  16. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεͷଌఆํ๏ γϯϓϧͳListView

  17. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεͷଌఆํ๏ վળલ

    վળޙ
  18. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips ɾsetState({})Λ࢖Θͳ͍

    ɾStateless WidgetΛ࢖͏ ɾมߋ͕ͳ͍Widgetʹ͸constΛ͚ͭΔ
  19. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips setState({})Λଟ༷͍ͯ͠Δ

    ɾStatefullWidgetͷbuild͔ΒWidgetΛ ࠶ੜ੒ͯ͠͠·͏ ɾجຊతʹsetState({})͸࢖Θͳ͍Α͏ʹ࣮૷
 ͢Δ΂͖
  20. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips FutureBuilder

    OR StreamBuilderΛ࢖͏
  21. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips setState({})Λ࢖͏৔໘

    ɾBottomNavigation΍ɺSidebarͳͲɺ
 ҙਤతʹbuild഑ԼͷWidgetΛॻ͖׵͑Δͱ ͖͚ͩʹ࢖͏
  22. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips ͱ͸͍͑ɺsetState({})࢖͍͍ͨɺɺɺ

    ɾͲ͏ͯ͠΋࢖͍͍ͨ৔߹͸ɺมԽ͠ͳ͍෦෼Λ Stateless Widgetʹ੾Γग़ͯ͠build഑ԼΛখ͘͢͞ Δ
  23. Copyright © ZOZO Technologies, Inc. All Rights Reserved. StatelessWidget StatefullWidget

    มԽ͠ͳ͍Widget
  24. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips Stateless

    WidgetΛ࢖͏ ɾมԽ͠ͳ͍෦෼ → Stateless Widgetʹ͢Δ ɾมԽ͢Δ෦෼͚ͩ → Statefull Widgetʹ͢Δ
  25. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips มߋ͕ͳ͍Widgetʹ͸constΛ͚ͭΔ

  26. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ·ͱΊ ɾsetState({})͸Ͱ͖Δ͚ͩ࢖͏Θͳ͍

    ɹ̍ɺ࢖͏ͱ͖͸ҙਤతʹWidgetΛมߋ͢Δͱ͖ ɹ̎ɺFutureBuilder StreamBuilderΛ࢖͏
 ɹ̏ɺ࢖͏৔߹͸Stateless Widgetʹ੾Γग़ͯ͠ build഑ԼΛখ͘͢͞Δ
  27. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ·ͱΊ ɾStateless

    Widget΋࢖ͬͯҰ౓ੜ੒ͨ͠Βมߋͳ͍
 ΋ͷΛΘ͚Δ 
 ɾconstΛ࢖ͬͯɺWidgetΛΩϟογϡ͢Δ
  28. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ࠷ޙʹ ɾͥͻʮKyatʯΛμ΢ϯϩʔυ͍ͯͩ͘͠͞

  29. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠