Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Flutter_meetup__7.pdf

shogo.yamada
February 09, 2019
8.1k

 Flutter_meetup__7.pdf

shogo.yamada

February 09, 2019
Tweet

Transcript

  1. ϓϩϑΟʔϧ 5XJUUFS ;0;0ςΫϊϩδʔζ ։ൃ෦ ࢁాঘޗ Copyright © ZOZO Technologies, Inc.

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

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

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

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

    Ө͢Δ͜ͱͰɺମܕσʔλΛܭଌ ˓ܭଌͨ͠ମܕσʔλ͸ɺॠ࣌ʹ%ϞσϧԽ͞Εɺ;0;0508/Ξ ϓϦʹอଘɻ%Ϟσϧ͸͋ΒΏΔ֯౓ʹಈ͔͢͜ͱ͕Ͱ͖ɺମܕΛ ౓νΣοΫ͢Δ͜ͱ͕Մೳ IUUQ[P[PKQ[P[PTVJU
  6. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ࠓ೔࿩͢͜ͱ ɾͳͥ΍Δͷ͔

    ɾύϑΥʔϚϯε͕ѱ͘ͳΔݪҼ͸ʁ ɾύϑΥʔϚϯεͷଌఆํ๏ ɾύϑΥʔϚϯε͕ѱ͘ͳΔΞϯνύλʔϯ ɾ·ͱΊ ɾ࠷ޙʹ
  7. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεͷଌఆํ๏ ᶃ

    ᶄ ᶅ ᶆ Widget͕ͲΕ͘Β͍ ࠶ੜ੒͍ͯ͠Δͷ͔ΈΕΔ
  8. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips setState({})Λଟ༷͍ͯ͠Δ

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

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

    ɾͲ͏ͯ͠΋࢖͍͍ͨ৔߹͸ɺมԽ͠ͳ͍෦෼Λ Stateless Widgetʹ੾Γग़ͯ͠build഑ԼΛখ͘͢͞ Δ
  11. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ύϑΥʔϚϯεΛվળ͢ΔTips Stateless

    WidgetΛ࢖͏ ɾมԽ͠ͳ͍෦෼ → Stateless Widgetʹ͢Δ ɾมԽ͢Δ෦෼͚ͩ → Statefull Widgetʹ͢Δ
  12. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ·ͱΊ ɾsetState({})͸Ͱ͖Δ͚ͩ࢖͏Θͳ͍

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

    Widget΋࢖ͬͯҰ౓ੜ੒ͨ͠Βมߋͳ͍
 ΋ͷΛΘ͚Δ 
 ɾconstΛ࢖ͬͯɺWidgetΛΩϟογϡ͢Δ