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

プロトタイプ開発とFlutter

 プロトタイプ開発とFlutter

Ryosuke Horie

July 19, 2018
Tweet

More Decks by Ryosuke Horie

Other Decks in Programming

Transcript

  1. © Start Today Technologies Inc. ࣗݾ঺հ w ງߐ྄հ w ελʔττΡσΠςΫϊϩδʔζ

    w ৽ࣄۀ૑଄෦ϑϩϯτΤϯυνʔϜ w "OESPJEΤϯδχΞ w !)PSJF
  2. © Start Today Technologies Inc. w Ҏ্ͷγϣοϓɺ Ҏ্ͷϒϥϯυͷऔ Γѻ͍ʢ೥݄຤࣌఺ʣ wৗ࣌ສ఺Ҏ্ͷ঎඼ΞΠςϜ਺ͱຖ೔ฏۉ

     ఺Ҏ্ͷ৽ண঎඼Λܝࡌ wଈ೔഑ૹαʔϏεΪϑτϥοϐϯάαʔϏεπ έ෷͍͓·͔ͤఆظศ ೔ຊ࠷େڃͷϑΝογϣϯγϣοϐϯάαΠτ
  3. © Start Today Technologies Inc. ϓϩτλΠϓͷ࢓༷ w εϚʔτεϐʔΧʔͰʮ৭ʯʮࡐ࣭ʯʮ෰ʯΛೖྗ w ண͜ͳ͠΍߹ΘͤΔΞΠςϜΛฦ౴

    w ೖྗΛΫΤϦͱͯ͠8&"3ͷݕࡧ݁ՌΛΞϓϦͰදࣔ͢Δ w J04"OESPJEͰ࣮૷͠ɺϓογϡ௨஌Λड͚औΔ w ࢦఆ͞ΕͨΫΤϦͰ8&"3ͷݕࡧ݁ՌϖʔδΛ8FC7JFXͰදࣔ
  4. © Start Today Technologies Inc. ϓϩτλΠϓͷ࢓༷ w εϚʔτεϐʔΧʔͰʮ৭ʯʮࡐ࣭ʯʮ෰ʯΛೖྗ w ண͜ͳ͠΍߹ΘͤΔΞΠςϜΛฦ౴

    w ೖྗΛΫΤϦͱͯ͠8&"3ͷݕࡧ݁ՌΛΞϓϦͰදࣔ͢Δ w J04"OESPJEͰ࣮૷͠ɺϓογϡ௨஌Λड͚औΔ w ࢦఆ͞ΕͨΫΤϦͰ8&"3ͷݕࡧ݁ՌϖʔδΛ8FC7JFXͰදࣔ
  5. © Start Today Technologies Inc. 'MVUUFSͰ࣮૷ͨ͠ཧ༝ w ΫϩεϓϥοτϑΥʔϜ w ਓͰJ04"OESPJE྆ํΛ࣮૷͢Δඞཁ͕͋ͬͨ

    w ϓογϡ௨஌Λड͚औΓ8FC7JFXΛදࣔ͢Δ୯७ͳΞϓϦ w ࢼ͠ʹ࣮૷ͯ͠ΈΔͷʹௐ౓Α͍ w "OESPJE4UVEJPͰ։ൃͰ͖Δ w "OESPJEΤϯδχΞͱͯ͠͸ັྗత
  6. © Start Today Technologies Inc. 'MVUUFSଆͷ࣮૷ w ϩάΠϯॲཧ͸ະ࣮૷ w 66*%Ͱ୺຤ΛࣝผɺϩʔΧϧʹอଘ

    w ຊདྷͳΒ'JSFCBTF"VUIFOUJDBUJPOΛ࢖͏ͱྑͦ͞͏ w σόΠετʔΫϯΛ'JSFCBTF$MPVE'JSFTUPSFʹอଘ w '$.Ͱϓογϡ௨஌Λड͚औΓ w 8FC7JFXͰදࣔ
  7. © Start Today Technologies Inc. 'MVUUFSଆͷ࣮૷ w 66*%ͷੜ੒ w IUUQTQVCEBSUMBOHPSHQBDLBHFTVVJEΛ࢖༻

    w 3'$ͷ7FSTJPO  ʹ४ڌͨ͠66*%Λੜ੒ import 'package:uuid/uuid.dart'; var uuid = Uuid().v4();
  8. © Start Today Technologies Inc. 'MVUUFSଆͷ࣮૷ w 66*%ͷϩʔΧϧ΁ͷอଘ w IUUQTQVCEBSUMBOHPSHQBDLBHFTTIBSFE@QSFGFSFODFTΛ࢖༻

    _saveUUID(String uuid) async { var prefs = await SharedPreferences.getInstance(); await prefs.setString('uuid', uuid); } Future<String> _loadUUID() async { var prefs = await SharedPreferences.getInstance(); return await prefs.getString('uuid'); }
  9. © Start Today Technologies Inc. 'MVUUFSଆͷ࣮૷ w $MPVE'JSFTUPSF΁ͷอଘ w IUUQTQVCEBSUMBOHPSHQBDLBHFTDMPVE@pSFTUPSFΛ࢖༻

    import 'package:uuid/uuid.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; var uuid = Uuid().v4(); Firestore.instance .collection('tokens') .document(uuid) .setData({'token': DEVICE_TOKEN});
  10. © Start Today Technologies Inc. 'MVUUFSଆͷ࣮૷ w '$.Ͱϓογϡ௨஌Λड͚औΓ w IUUQTQVCEBSUMBOHPSHQBDLBHFTpSFCBTF@NFTTBHJOHΛ࢖༻

    import 'package:firebase_messaging/firebase_messaging.dart'; final _firebaseMessaging = new FirebaseMessaging(); _firebaseMessaging.configure(onMessage: (Map<String, dynamic> message) { print("onMessage: $message"); }, onLaunch: (Map<String, dynamic> message) { print("onLaunch: $message"); }, onResume: (Map<String, dynamic> message) { print("onResume: $message"); });
  11. © Start Today Technologies Inc. 'MVUUFSଆͷ࣮૷ w 8FC7JFXͰͷදࣔ w IUUQTQVCEBSUMBOHPSHQBDLBHFTqVUUFS@XFCWJFX@QMVHJOΛ࢖༻

    new MaterialApp(routes: { "/": (_) => new WebviewScaffold( url: "https://www.google.com", appBar: new AppBar( title: new Text("Widget webview"), ), ) }, );
  12. © Start Today Technologies Inc. ·ͱΊ w 'MVUUFSΛϓϩτλΠϓ։ൃͰ࢖ͬͯΈͨ w ϓϩτλΠϓΛ଎͘࡞Δͷʹྑ͔ͬͨ

    w ΫϩεϓϥοτϑΥʔϜɺ)PU3FMPBEɺ"OESPJE4UVEJPͰͷ։ൃ w 'MVUUFS͔Β'JSFCBTFΛར༻͢Δͷ͸ඇৗʹ؆୯ w 'JSFCBTFศར