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

Flutter_meetup_6.pdf

E222076ea6b90ae53c2bc68c8a4e01f1?s=47 shogo.yamada
December 06, 2018
590

 Flutter_meetup_6.pdf

E222076ea6b90ae53c2bc68c8a4e01f1?s=128

shogo.yamada

December 06, 2018
Tweet

Transcript

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

    ࢁాঘޗ 'MVUUFSͰνϟοτػೳΛ࡞Δ ্Ͱߟ͑ͨ͜ͱ
  2. ϓϩϑΟʔϧ 5XJUUFS ;0;0ςΫϊϩδʔζ ։ൃ෦ ࢁాঘޗ Copyright © ZOZO Technologies, Inc.

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

    ˓ʮڀۃͷϑΟοτײʯΛ࣮ݱͨ͠ϕʔγοΫΞΠςϜΛఏڙ άϩʔόϧαΠτʮ;0;0DPNʯͰւ֎ల։ ˓ΞΠςϜ̩γϟπɺσχϜύϯπɺγϟπɺϏδωεεʔπɺ ωΫλΠɺϘʔμʔ̩γϟπɺ௕କΫϧʔωοΫ̩γϟπͳͲ IUUQ[P[PKQQC
  7. Copyright © ZOZO Technologies, Inc. All Rights Reserved. 'MVUUFS੡ࣸਅڞ༗ΞϓϦ ʮ(SPVQ"MCVNʯ

    ݱࡏ$IBUػೳΛ࣮૷͍ͯ͠·͢ʂ
  8. ࿩͢͜ͱ Copyright © ZOZO Technologies, Inc. All Rights Reserved. ɾ࡞ͬͨ΋ͷ

    ɾͳͥνϟοτػೳʁ ɾνϟοτػೳཁ݅ ɾ'MVUUFSͰͷ࣮૷ํ๏ ɾࠓ΍ͬͯΔ͜ͱ
  9. ࡞ͬͨ΋ͷ Copyright © ZOZO Technologies, Inc. All Rights Reserved.

  10. ͳͥνϟοτػೳʁ Copyright © ZOZO Technologies, Inc. All Rights Reserved. ɾ'MVUUFSʹ͍ͭͯٞ࿦Ͱ͖ΔϓϥοτϑΥʔϜΛࣗ෼Ͱ࡞Γ

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

    ɾϝοηʔδ͕དྷͨΒ1VTI௨஌Λଧͭ ɾϢʔβʔ؅ཧΛ͢Δ ɾະಡ਺͸ͪΌΜͱදࣔ͢Δ ɾJ04ͱ"OESPJEʹରԠ͍ͯ͠Δ ɾFUD
  12. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ʮνϟοτػೳʯ ΍Δ͜ͱͨ͘͞Μ͋Δ

  13. Copyright © ZOZO Technologies, Inc. All Rights Reserved. ͦ͜Ͱ'JSFCBTF

  14. νϟοτػೳཁ݅ Copyright © ZOZO Technologies, Inc. All Rights Reserved. ɾϝοηʔδ͸ϦΞϧλΠϜͰը໘ʹ൓ө͢Δ

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

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

    ɾϝοηʔδ͕དྷͨΒ1VTI௨஌Λଧͭˠ$MPVE'VODUJPOT 'JSFCBTF .FTTBHJOH ɾϢʔβʔ؅ཧΛ͢Δˠ'JSFCBTF"VUIFOUJDBUF ɾະಡ਺͸ͪΌΜͱදࣔ͢Δˠ࣮૷த͚ͩͲɺͨͿΜ$MPVE'JSFTUPSFͰ͍͚Δ ɾJ04ͱ"OESPJEʹରԠ͍ͯ͠Δˠ'MVUUFS͔ͩΒ༨༟ ࠓճ͸͜ͷೋͭʹ͍ͭͯઆ໌
  17. $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, ); })
  18. $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, ); })
  19. $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(); }
  20. ϦΞϧλΠϜʹมߋΛ؂ࢹͰ͖Δ Copyright © ZOZO Technologies, Inc. All Rights Reserved.

  21. 1VTI௨஌ Copyright © ZOZO Technologies, Inc. All Rights Reserved. https://pub.dartlang.org/packages/firebase_messaging

  22. 1VTI௨஌ Copyright © ZOZO Technologies, Inc. All Rights Reserved. requestPermission()

    { _firebaseMessaging.requestNotificationPermissions( const IosNotificationSettings(sound: true, badge: true, alert: true)); } ɾJ04ͱ"OESPJEͷ΋Ζ΋ΖͷઃఆΛ͢Δ J04͸ূ໌ॻͱ͔ ɾJ04ͷ৔߹͸ύʔϛογϣϯΛͱΔ
  23. 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"); }, ); }
  24. 1VTI௨஌Λड͚औͬͨΒόοδΛ͚ͭΔ Copyright © ZOZO Technologies, Inc. All Rights Reserved. https://pub.dartlang.org/packages/flutter_app_badger

  25. όοδΛ͚ͭΔ Copyright © ZOZO Technologies, Inc. All Rights Reserved. ΞΠίϯόοδΛ͚͍ͭͨλΠϛϯάͰ࣮ߦ͢Δ

    void _addBadge() { FlutterAppBadger.updateBadgeCount(1); } void _removeBadge() { FlutterAppBadger.removeBadge(); }
  26. ࠓ΍ͬͯΔ͜ͱ Copyright © ZOZO Technologies, Inc. All Rights Reserved. ɾະಡ਺ΛϦετʹදࣔ͢Δ

    ɾϦετΛϝοηʔδ৽ணॱʹ͢Δ ɾͦͷଞࡉ͔͍ෆ۩߹मਖ਼
  27. ࠙਌ձͰͥͻ͓࿩͠͠·͠ΐ͏ ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ Copyright © ZOZO Technologies, Inc. All Rights Reserved.