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

Flutterでアプリを作る?

 Flutterでアプリを作る?

5f1c81bdb828cc4d748121a411953952?s=128

こばやしただあき

August 28, 2019
Tweet

Transcript

  1. 'MVUUFSͰΞϓϦΛ
 ࡞Δʁ ͜͹΍͖ͨͩ͋͠ 

  2. ࣗݾ঺հ ͜͹΍͖ͨͩ͋͠!LPCBCJ[ ΢ΣϒίϯαϧɺίʔνɻʢϓϩάϥϚʔͰ͸ͳ͍ʣ
 4XJGUྺ͸ɺࠓ೥͔Β
 "OESPJE͸ɺ݄͙Β͍͔Β 5XJUUFSɿ!LPCBCJ[
 'BDFCPPLɿLPCB
 ʢ͜͹΍͖ͨͩ͋͠ʣ ϑΥϩʔͳͲ͸ɺ͓ؾܰʹɻ

  3. ࠓ೔ͷ಺༰ ɾ࠷ۙ࡞ͬͨΞϓϦͷ঺հ ɾ'MVUUFSΛࢼͯ͠Έͨ ɾ'MVUUFSͷײ૝ͳͲ

  4. ࠷ۙ࡞ͬͨΞϓϦ w (PBMMJTUʢԁ݄ʣʢ+BWBTDSJQUʴ'JSFCBTFʣ w -JOL5PVDIϒϥ΢βʔʢԁʣʢ4XJGUʣ w ϏδΦεɾϏδωεॻͷΦεεϝ·ͱΊʢແྉʣ
 J04ʢ4XJGUʣɺ"OESPJEʢ+BWBɺҰ෦,PUMJOʣ

  5. -JOL5PVDIϒϥ΢βʔ J1IPOFɺJ1BE޲͚ͷϒϥ΢βʔʢԁʣ ࢖͍΍͍͢͸ͣͳͷͰɺ࢖ͬͯΈ͍ͯͩ͘͞ɻ

  6. None
  7. σϞ

  8. ϏδΦε ແྉ
 J1IPOFʢ4XJGUʣɺ"OESPJEΞϓϦʢ+BWB ,PUMJOʣ
 ϏδωεॻͳͲͷΦεεϝຊΛ·ͱΊ͍ͯΔ
 ϏδωεॻͳͲʹڵຯ͕͋Δํ͸ɺ
 Πϯετʔϧ͍ͯͩ͘͠͞ɻ

  9. ϏδΦε'JSFCBTF 'JSFTUPSFɿຊͷσʔλ $MPVE.FTTBHJOHɿϓογϡ௨஌ $SBTIMZTUJDT "ENPC

  10. ϏδΦεΛ࡞ͬͨཧ༝ ϏδωεॻͷϝϧϚΨʮ஌ࣝΛνΧϥʹʯ ߸ ˣ ΦεεϝΛ·ͱΊ͔ͨͬͨ ˣ ΞϓϦʹ͠Α͏ʢJ04ɺ"OESPJEʣ

  11. None
  12. σϞ ΞϓϦ͸ɺେͨ͜͠ͱ͸͍ͯ͠ͳ͍Ͱ͕͢ɺ ࡭ͷϏδωεॻ͔Β
 ΦεεϝΛݫબͯ͠·ͱΊͯ͋ΔͷͰɺ
 ͜ΕΒΛಡΊ͹ɺ͋ͱ͋ͱ࢓ࣄͳͲͰ໾ʹཱͭ͸ͣͰ͢ɻ

  13. ໨ඪϦετ؅ཧ
 ʮ(PBMMJTUDPNʯ ίʔνΛ΍͍ͬͯΔͷͰɺ໨ඪ؅ཧ͸ॏཁɻ
 ͔͠͠ɺ໨ඪΛϦετͰ؅ཧͰ͖ΔΞϓϦ͕ͳ͍ɻ
 ͔ͩΒ࡞Γ·ͨ͠ɻ εϚϗͰ΋࢖͑·͢ɻ̓೔ؒ͸ແྉͳͷͰɺࢼͯ͠Έ͍ͯͩ͘͞ɻ

  14. σϞ

  15. ࠓ೥ͷ໨ඪΛཱͯͨํʁ

  16. ໨ඪ͕͋Δ͔ͳ͍͔ ΍Γ͍ͨ͜ͱˠ໨ඪˠୡ੒ˠධՁ
 ˣ
 ͞Βʹ΍Γ͍ͨ͜ͱ͕Ͱ͖Δ ΍Γ͍ͨ͜ͱˠ໨ඪ͕ͳ͍ˠୡ੒͠ͳ͍ˠධՁ͞Εͳ͍
 ˣ
 ΍Γ͍ͨ͜ͱ͕Ͱ͖ͳ͍ ໨ඪ͕͋Δͱ ໨ඪ͕ͳ͍ͱ

  17. ΍Γ͍ͨ͜ͱΛ໨ඪʹ͢Δ ࣮ݱՄೳੑ͕ߴ·Δɻ Կ͔Λୡ੒͢Δͱɺ
 ଞͷ΍Γ͍ͨ͜ͱ΋΍Γ΍͘͢ͳΔɻ ΍Γ͍ͨ͜ͱΛɺ໨ඪʹͯ͠Έ͍ͯͩ͘͞ɻ

  18. J04ͱ"OESPJEΞϓϦΛ
 ࡞ͬͯ ɾແྉ͸ɺΠϯετʔϧͯ͠΋Β͍΍͍͢ ɾ༗ྉ͸ɺແྉͷ෼ͷ̍ఔ౓ ɾJ04ɿ"OESPJEʹɹɿ̎

  19. 'MVUUFSΛࢼͯ͠Έͨ ̍ϲ݄΄Ͳɺ͍Ζ͍Ζςετ

  20. 'MVUUFS IUUQTqVUUFSEFW 'MVUUFSͷӳޠͷҙຯ͸ɺ
 ʮ͸ͨΊ͘ɺڳ༂ΒͤΔʯͱݴͬͨҙຯ (PPHMF͕࡞͍ͬͯΔ

  21. 'MVUUFSΛ΍Ζ͏ͱࢥͬͨཧ༝ J04ͱ"OESPJEɺਓͰͭ࡞Δͷ͸େม ϋΠϒϦουɺΫϩεϓϥοτϑΥʔϜ Λݕ౼ 8FCɺ.BD΋࡞Γ͍ͨ ͳ͓͞Βɺਓ։ൃͩͱେมͳͷͰ

  22. ΫϩεϓϥοτϑΥʔϜ։ൃ͸ɺ
 ͍͔ͭ͋͘Δ ɾ$PSEPWBɺJPOJDɿࠓ͸ɺ"QBDIFɻ
 ɹੲ͸"EPCF͕࡞͍ͬͯͨɻ ɾ3FBDUOBUJWFɿ'BDFCPPL͕࡞͍ͬͯΔɻ ɾ'MVUUFSɿ(PPHMF͕࡞͍ͬͯΔɻ ଞʹ΋ɺ9BNBSJOʢ.4ʣɺ/BUJWF4DSJQUͳͲ΋͋Δ

  23. 'MVUUFSΛ৮ͬͯΈͨཧ༝ J04ɺ"OESPJEΛ࡞ΕΔɻ 8FCʹ΋ɺ.BDΞϓϦ΋࡞ΕΔΒ͍͔͠Βɻ 'JSFCBTF΋ɺ(PPHMFͳͷͰ ৽͍͔͠Β

  24. 'MVUUFSͷྑ͔ͬͨͱ͜Ζ ˕ͭͰɺJ04΋"OESPJE΋࡞ΕΔ ˕ϚςϦΞϧσβΠϯ͸؆୯ʹͰ͖Δ ˓ϗοτϦϩʔυʢϏϧυ͕͋·Γඞཁͳ͍ʣ ˓%BSU͸ɺͦ͜·Ͱ೉͘͠͸ͳ͍ɹ+BWBTDSJQUͬΆ͍
 ʢOVMM҆શͰ͸ͳ͍͚Ͳʣ ˓ΞϓϦͷ଎౓తʹ͸ɺ஗͘͸ͳ͍

  25. 'MVUUFSΠϚΠνͳͱ͜Ζ º৘ใ͕গͳ͍ɻجຊతʹӳޠɻ
 ɹӳޠͰ΋গͳ͍͚ΕͲɺ೔ຊޠͩͱ΋ͬͱগͳ͍ɻ
 ɹͨͩ͠ɺ࠷ۙɺϢʔβʔͷ੝Γ্͕Γ͸͋Δɻ ˚ࡉ͔͍͜ͱΛ΍Ζ͏ͱ͢Δͱɺ
 ɹ4XJGU΍,PUMJO͕ඞཁʹͳΔɻɹ"1*Ͱͭͳ͛Δ ˚ωετ͕ਂ͘ͳΓ΍͍͢ɻɹϑΝΠϧΛ෼͚Δ ˚ίʔυͰॻ͍͍ͯ͘

  26. ωετ͕ਂ͘ͳΔ // Flutter class CustomCard extends StatelessWidget { CustomCard({@required this.index,

    @required this.onPress}); final index; final Function onPress; @override Widget build(BuildContext context) { return Card( child: Column( children: <Widget>[ Text('Card $index'), FlatButton( child: const Text('Press'), onPressed: this.onPress, ), ], ) ); } } ... // Usage CustomCard( index: index, onPress: () { print('Card $index'); }, ) ..
  27. ͜Μͳਓɺ༻్ʹྑͦ͞͏ w J04ɺ"OESPJEɺͲͪΒ͔͔͠΍ͬͨ͜ͱ͕ͳ͍ਓ w ϓϩτλΠϓ࡞੒ w ৽͍͠ͷ͕޷͖ͳਓ
 ϓϩάϥϚʔ͡Όͳ͍ਓʹ͸ɺݱ࣌఺Ͱ͸ਏ͍ɻ ৘ใɺαϯϓϧ͕গͳ͍͔Β ೥ޙʹ͸ɺ৘ใ΋૿͑ͯɺ΋ͬͱྑ͘ͳ͍ͬͯΔ͔΋ɻ

  28. ݸਓతʹ͸ɺอཹ J04ɺ"OESPJEͳͲෳ਺ͷ04ͷ։ൃɺ ϋΠϒϦουɺΫϩεϓϥοτϑΥʔϜ։ൃ Έͳ͞ΜɺͲ͏͍ͯ͠·͔͢ʁ

  29. ݸਓతʹ͸ $PSEPWB͔3FBDUOBUJWF͔ɻ ΋͘͠͸ɺఘΊͯɺ4XJGUɺ,PUMJO͔ͳ

  30. ࣍ʹ࡞Γ͍ͨ΋ͷ w4/4ͬΆ͍΋ͷ wϒϩάʹؔ܎͢Δ΋ͷ Ұॹʹ࡞ͬͯ͘ΕΔͱ͍͏ਓ͕͍Ε͹ɺͳ͋ɻ ͱࢥ͏ͷͰɺڵຯ͕͋Δํ͸ɺ੠ͳͲΛ͔͚ͯ ͍ͩ͘͞ɻ

  31. ͜͹΍͖ͨͩ͋͠!LPCBCJ[ IUUQTXXXCJ[QOFUDPNLPCBCJ[ 5XJUUFSɿ!LPCBCJ[
 'BDFCPPLɿLPCB
 ʢ͜͹΍͖ͨͩ͋͠ʣ ϑΥϩʔͳͲ͸ɺ͓ؾܰʹɻ

  32. ϫʔΫγϣοϓΛ։࠵ ʢ౔ʣʙ ʮ͓ۚʯͱʮΞ΢τϓοτʯͷϫʔΫγϣοϓ '1ͷํͱɺΘͨ͠ͱɻ Ոܭͱ৘ใൃ৴Λ
 ݟ௚͍ͨ͠ํ͸ɺͥͻʂ