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

Flutter_meetup_6.pdf

shogo.yamada
December 06, 2018
700

 Flutter_meetup_6.pdf

shogo.yamada

December 06, 2018
Tweet

Transcript

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

    All Rights Reserved. !ZTIPHP (JUIVC !ZTIPHP 'MVUUFS৘ใൃ৴ϒϩάʮދࢹᚳʑͱʯ IUUQTXXXTIPHPHFFLDPN
  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;0508/Ξ ϓϦʹอଘɻ%Ϟσϧ͸͋ΒΏΔ֯౓ʹಈ͔͢͜ͱ͕Ͱ͖ɺମܕΛ ౓νΣοΫ͢Δ͜ͱ͕Մೳ IUUQ[P[PKQ[P[PTVJU
  5. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ˓ʮ;0;046*5ʯͰܭଌͨ͠ମܕσʔλΛ΋ͱʹɺҰਓͻͱΓͷମ ܕʹ߹ͬͨʮ͋ͳͨαΠζʯͷΞΠςϜ

    ˓ʮڀۃͷϑΟοτײʯΛ࣮ݱͨ͠ϕʔγοΫΞΠςϜΛఏڙ άϩʔόϧαΠτʮ;0;0DPNʯͰւ֎ల։ ˓ΞΠςϜ̩γϟπɺσχϜύϯπɺγϟπɺϏδωεεʔπɺ ωΫλΠɺϘʔμʔ̩γϟπɺ௕କΫϧʔωοΫ̩γϟπͳͲ IUUQ[P[PKQQC
  6. ࿩͢͜ͱ Copyright © ZOZO Technologies, Inc. All Rights Reserved. ɾ࡞ͬͨ΋ͷ

    ɾͳͥνϟοτػೳʁ ɾνϟοτػೳཁ݅ ɾ'MVUUFSͰͷ࣮૷ํ๏ ɾࠓ΍ͬͯΔ͜ͱ
  7. ͳͥνϟοτػೳʁ Copyright © ZOZO Technologies, Inc. All Rights Reserved. ɾ'MVUUFSʹ͍ͭͯٞ࿦Ͱ͖ΔϓϥοτϑΥʔϜΛࣗ෼Ͱ࡞Γ

    ͍ͨ ɾ'MVUUFSͱ'JSFCBTFͰͲ͜·Ͱӡ༻Ͱ͖Δͷ͔ࢼͯ͠Έ͍ͨ ɾ'MVUUFSͷੌ͞Λମײ͍ͨ͠
  8. νϟοτػೳཁ݅ Copyright © ZOZO Technologies, Inc. All Rights Reserved. ɾϝοηʔδ͸ϦΞϧλΠϜͰը໘ʹ൓ө͢Δ

    ɾϝοηʔδ͕དྷͨΒ1VTI௨஌Λଧͭ ɾϢʔβʔ؅ཧΛ͢Δ ɾະಡ਺͸ͪΌΜͱදࣔ͢Δ ɾJ04ͱ"OESPJEʹରԠ͍ͯ͠Δ ɾFUD
  9. νϟοτػೳཁ݅ Copyright © ZOZO Technologies, Inc. All Rights Reserved. ɾϝοηʔδ͸ϦΞϧλΠϜͰը໘ʹ൓ө͢Δ

    ɾϝοηʔδ͕དྷͨΒ1VTI௨஌Λଧͭ ɾϢʔβʔ؅ཧΛ͢Δ ɾະಡ਺͸ͪΌΜͱදࣔ͢Δ ɾJ04ͱ"OESPJEʹରԠ͍ͯ͠Δ
  10. νϟοτػೳཁ݅ Copyright © ZOZO Technologies, Inc. All Rights Reserved. ɾϝοηʔδ͸ϦΞϧλΠϜͰը໘ʹ൓ө͢Δˠ$MPVE'JSFTUPSF

    ɾϝοηʔδ͕དྷͨΒ1VTI௨஌Λଧͭˠ$MPVE'VODUJPOT 'JSFCBTF .FTTBHJOH ɾϢʔβʔ؅ཧΛ͢Δˠ'JSFCBTF"VUIFOUJDBUF ɾະಡ਺͸ͪΌΜͱදࣔ͢Δˠ࣮૷த͚ͩͲɺͨͿΜ$MPVE'JSFTUPSFͰ͍͚Δ ɾJ04ͱ"OESPJEʹରԠ͍ͯ͠Δˠ'MVUUFS͔ͩΒ༨༟
  11. νϟοτػೳཁ݅ Copyright © ZOZO Technologies, Inc. All Rights Reserved. ɾϝοηʔδ͸ϦΞϧλΠϜͰը໘ʹ൓ө͢Δˠ$MPVE'JSFTUPSF

    ɾϝοηʔδ͕དྷͨΒ1VTI௨஌Λଧͭˠ$MPVE'VODUJPOT 'JSFCBTF .FTTBHJOH ɾϢʔβʔ؅ཧΛ͢Δˠ'JSFCBTF"VUIFOUJDBUF ɾະಡ਺͸ͪΌΜͱදࣔ͢Δˠ࣮૷த͚ͩͲɺͨͿΜ$MPVE'JSFTUPSFͰ͍͚Δ ɾJ04ͱ"OESPJEʹରԠ͍ͯ͠Δˠ'MVUUFS͔ͩΒ༨༟ ࠓճ͸͜ͷೋͭʹ͍ͭͯઆ໌
  12. $MPVE'JSFTUPSF Copyright © ZOZO Technologies, Inc. All Rights Reserved. child:

    StreamBuilder( stream: chatHelper .getMessages(widget.groupId) .asBroadcastStream(), builder: (context, snapshot) { if (snapshot == null || snapshot.data == null) return Container(); return new ListView.builder( padding: new EdgeInsets.all(8.0), reverse: true, itemBuilder: (_, int index) { // ͜͜ͰϝοηʔδΛදࣔ͢Δ }, itemCount: snapshot.data.documents.length, ); })
  13. $MPVE'JSFTUPSF Copyright © ZOZO Technologies, Inc. All Rights Reserved. child:

    StreamBuilder( stream: chatHelper .getMessages(widget.groupId) .asBroadcastStream(), builder: (context, snapshot) { if (snapshot == null || snapshot.data == null) return Container(); return new ListView.builder( padding: new EdgeInsets.all(8.0), reverse: true, itemBuilder: (_, int index) { // ͜͜ͰϝοηʔδΛදࣔ͢Δ }, itemCount: snapshot.data.documents.length, ); })
  14. $MPVE'JSFTUPSF Copyright © ZOZO Technologies, Inc. All Rights Reserved. Stream<QuerySnapshot>

    getMessages(String groupId) { return Firestore.instance .collection("group") .document(groupId) .collection("message") .orderBy("created_at", descending: true) .snapshots(); }
  15. 1VTI௨஌ Copyright © ZOZO Technologies, Inc. All Rights Reserved. requestPermission()

    { _firebaseMessaging.requestNotificationPermissions( const IosNotificationSettings(sound: true, badge: true, alert: true)); } ɾJ04ͱ"OESPJEͷ΋Ζ΋ΖͷઃఆΛ͢Δ J04͸ূ໌ॻͱ͔ ɾJ04ͷ৔߹͸ύʔϛογϣϯΛͱΔ
  16. 1VTI௨஌ Copyright © ZOZO Technologies, Inc. All Rights Reserved. 1VTI௨஌Λड͚औͬͯ։͍ͨͱ͖ͷڍಈΛ؂ࢹ͢Δ

    _initSettingNotification (BuildContext context) { _firebaseMessaging.configure( onMessage: (Map<String, dynamic> message) async { print("onMessage: $message"); }, onLaunch: (Map<String, dynamic> message) async { print("onLaunch: $message"); }, onResume: (Map<String, dynamic> message) async { print("onResume: $message"); }, ); }
  17. όοδΛ͚ͭΔ Copyright © ZOZO Technologies, Inc. All Rights Reserved. ΞΠίϯόοδΛ͚͍ͭͨλΠϛϯάͰ࣮ߦ͢Δ

    void _addBadge() { FlutterAppBadger.updateBadgeCount(1); } void _removeBadge() { FlutterAppBadger.removeBadge(); }