Slide 1

Slide 1 text

2023.9.29 FlutterͰ΋γϦΞϧίϯιʔϧ௨৴ Ͱ͖Δ΋Μ! YUMEMI Inc. Flutter Engineer - Onoue Ryotaro YOUTRUST × ΏΊΈ Flutter LTձ@ौ୩ #3

Slide 2

Slide 2 text

0. whoami

Slide 3

Slide 3 text

1. Today’s topic γϦΞϧίϯιʔϧ௨৴ × Flutter

Slide 4

Slide 4 text

γϦΞϧ .. . ? ίϯιʔϧ…? 1-1. γϦΞϧίϯιʔϧͬͯͳΜͧ΍?

Slide 5

Slide 5 text

γϦΞϧ .. . ? ίϯιʔϧ…? 1-1. γϦΞϧίϯιʔϧͬͯͳΜͧ΍?

Slide 6

Slide 6 text

γϦΞϧ .. . ? ίϯιʔϧ…? 1-1. γϦΞϧίϯιʔϧͬͯͳΜͧ΍?

Slide 7

Slide 7 text

γϦΞϧ .. . ? ίϯιʔϧ…? 1-1. γϦΞϧίϯιʔϧͬͯͳΜͧ΍? 71/ϧʔλͱεΠον

Slide 8

Slide 8 text

γϦΞϧ .. . ? ίϯιʔϧ…? 1-1. γϦΞϧίϯιʔϧͬͯͳΜͧ΍? Oracle Cloud Infrastructure ͷ Compute InstanceʹγϦΞϧίϯιʔϧ઀ଓ

Slide 9

Slide 9 text

γϦΞϧ .. . ? ίϯιʔϧ…? 1-1. γϦΞϧίϯιʔϧͬͯͳΜͧ΍? 0SBDMF$MPVE*OGSBTUSVDUVSFͷ $PNQVUF*OTUBODFʹγϦΞϧίϯιʔϧ઀ଓ

Slide 10

Slide 10 text

γϦΞϧ .. . ? ίϯιʔϧ…? 1-1. γϦΞϧίϯιʔϧ௨৴ͬͯͳΜͧ΍? - γϦΞϧίϯιʔϧ / γϦΞϧϙʔτͱ͸? 1౓ʹ1bitͣͭσʔλΛૹड৴͢ΔΠϯλʔϑΣʔεύϥϨϧ઀ଓ σΟεϓϨΠ΍Ϛ΢ε౳ͷೖग़ྗΠϯλʔϑΣʔεΛ࣋ͨͳ͍αʔό΍૊ ΈࠐΈγεςϜʹ઀ଓ͢Δͷʹར༻͞Ε͍ͯΔ

Slide 11

Slide 11 text

CO2ηϯαʔ UD-CO2S 1-2. ۩ମతͳσόΠε

Slide 12

Slide 12 text

EQIS-1 1-2. ۩ମతͳσόΠε

Slide 13

Slide 13 text

Ճ଎౓ηϯαʔ EQIS-1 1-2. ۩ମతͳσόΠε (ࠨ): https: // quake.one/sense/ ΑΓ

Slide 14

Slide 14 text

GNSSड৴ػ 1-2. ۩ମతͳσόΠε https: / / prioris.jp/gnss/

Slide 15

Slide 15 text

2. FlutterͰγϦΞϧίϯιʔϧ ωΠςΟϒ͡Ό

Slide 16

Slide 16 text

ԿΛ࡞͍͖͍͔ͬͯͨ 2-0. ໨ඪ - ֓ཁ - CO2ηϯαʔͷ஋Λදࣔɾάϥϑදࣔ - ൚༻ੑͷߴ͍γϦΞϧίϯιʔϧؔ࿈ΫϥεΛ࡞Δ - ϓϥοτϑΥʔϜ - Android, macOS, Linux - iOS͸OSͷ੍໿্ݫ͍͠ - ঢ়ଶ؅ཧ - riverpod, flutter_hooks

Slide 17

Slide 17 text

Flutterͷ֎ͷੈք΁ΞΫηε 2-1. ϓϥάΠϯௐࠪ

Slide 18

Slide 18 text

Flutterͷ֎ͷੈք΁ΞΫηε 2-1. ϓϥάΠϯௐࠪ AndroidͰ࣮ߦ͢Δͱɺݖݶෆ଍ͰౖΒΕΔ - > ୅ΘΓʹusb_serial pluginΛ࢖͏͜ͱͰճආͰ͖Δ IUUQTHJUIVCDPNKQOVSNJ fl VUUFS@MJCTFSJBMQPSUJTTVFT IUUQTHJUIVCDPNKQOVSNJ fl VUUFS@MJCTFSJBMQPSUJTTVFT

Slide 19

Slide 19 text

Android ͱ ͦΕҎ֎Ͱར༻͢ΔϓϥάΠϯΛ෼͚Δ 2-2. ϓϥάΠϯ෼͚Δ࡞ઓ Android ↑ macOS, Linux, Windows ↑

Slide 20

Slide 20 text

Android ͱ ͦΕҎ֎Ͱར༻͢ΔϓϥάΠϯΛ෼͚Δ 2-2. ϓϥάΠϯ෼͚Δ࡞ઓ

Slide 21

Slide 21 text

Android ͱ ͦΕҎ֎Ͱར༻͢ΔϓϥάΠϯΛ෼͚Δ 2-2. ϓϥάΠϯ෼͚Δ࡞ઓ usb_serial (Android)

Slide 22

Slide 22 text

Android ͱ ͦΕҎ֎Ͱར༻͢ΔϓϥάΠϯΛ෼͚Δ 2-2. ϓϥάΠϯ෼͚Δ࡞ઓ flutter_libserialport (AndroidҎ֎)

Slide 23

Slide 23 text

Android ͱ ͦΕҎ֎Ͱར༻͢ΔϓϥάΠϯΛ෼͚Δ 2-2. ϓϥάΠϯ෼͚Δ࡞ઓ Android͔Ͳ͏͔ΛνΣοΫ࣮ͯ͠૷Λ੾Γସ͑Δ 👍: ࣮૷࣌ʹϓϥοτϑΥʔϜͷੈքͷ͜ͱΛߟ͑ͳͯ͘OK!

Slide 24

Slide 24 text

ڞ௨Խͨ͠SerialConsoleProviderΛୟ͘ 2-3. දࣔ·Ͱͷ࣮૷ ը໘ߏ੒ - σόΠεબ୒ը໘ (deviceSelectorPage) - ηϯαʔͷ৘ใΛදࣔ͢Δը໘ (monitoringPage)

Slide 25

Slide 25 text

RiverpodͰΰγΰγ͢Δ 2-3-1. σόΠεબ୒ը໘ serialConsoleDeviceΛҰཡ͢ΔFutureProviderΛ࡞ͬͯ͋͛ͯ switchࣜ(ύλʔϯϚονϯά)Ͱ [σόΠεແ͠ɾσόΠεҰཡɾ ಡΈࠐΈதɾΤϥʔ]ঢ়ଶͰग़͠෼͚

Slide 26

Slide 26 text

RiverpodͰΰγΰγ͢Δ 2-3-1. σόΠεબ୒ը໘ σόΠεҰཡͰListTileΛදࣔͯ͠ λοϓ͞ΕͨΒ MonitoringPage ΁ભҠ

Slide 27

Slide 27 text

RiverpodͰΰγΰγ͢Δ 2-3-2. ϞχλϦϯάը໘ CO2SensorProvider: ଌఆ஋ͷอ࣋ɾ։࢝ॲཧ ʮCO2=489,HUM=46.4,TMP=28.6ʯͰྲྀΕͯ͘Δଌఆ஋ͷύʔε

Slide 28

Slide 28 text

RiverpodͰΰγΰγ͢Δ 2-3-2. ϞχλϦϯάը໘ CO2SensorProvider: ଌఆ஋ͷอ࣋ɾ։࢝ॲཧ ʮCO2=489,HUM=46.4,TMP=28.6ʯͰྲྀΕͯ͘Δଌఆ஋ͷύʔε

Slide 29

Slide 29 text

< - Starbucks ԣ඿ͦ͝͏ళ ࠓ೔͜͜·ͰདྷΔ·Ͱͷిं(ΓΜ͔͍ઢ) ↓

Slide 30

Slide 30 text

3. Live Demo PixelͰಈ͔ͯ͠Έ·͢ʙ

Slide 31

Slide 31 text

FlutterͰ΋γϦΞϧίϯιʔϧ௨৴Ͱ͖Δ΋Μ! 4. ·ͱΊ ͱ Φν - Flutter͔ͩΒωΠςΟϒ৮Δػೳ͸࢖͑ͳ͍ΜͰ͠ΐ? - > ͍͍͑ Plugin͕͋Γ·͢ (౰વྫ֎͸͋Γ·͕͢) - γϦΞϧίϯιʔϧ௨৴Ͱ෺ཧతͳσόΠεͱ઀ଓͯ͠ ৘ใΛૹड৴͢Δ͜ͱ͕Ͱ͖Δ - ࠓޙ Ճ଎౓ηϯαʔ΍GNSSड৴ػͷApp΋࡞͍ͬͯͭ͘΋ΓͰ͢

Slide 32

Slide 32 text

FlutterͰ΋γϦΞϧίϯιʔϧ௨৴Ͱ͖Δ΋Μ! - Flutter͔ͩΒωΠςΟϒ৮Δػೳ͸࢖͑ͳ͍ΜͰ͠ΐ? - > ͍͍͑ Plugin͕͋Γ·͢ (౰વྫ֎͸͋Γ·͕͢) - γϦΞϧίϯιʔϧ௨৴Ͱ෺ཧతͳσόΠεͱ઀ଓͯ͠ ৘ใΛૹड৴͢Δ͜ͱ͕Ͱ͖Δ - ࠓޙ Ճ଎౓ηϯαʔ΍GNSSड৴ػͷApp΋࡞͍ͬͯͭ͘΋ΓͰ͢ 4. ·ͱΊ ͱ Φν pub.devʹग़͍ͯͳ͍͚ͩͰ ίʔυ͸ ͢ͰʹରԠ͞Εͯͨ!!!

Slide 33

Slide 33 text

FlutterͰ΋γϦΞϧίϯιʔϧ௨৴Ͱ͖Δ΋Μ! 4. ·ͱΊ ͱ Φν - Flutter͔ͩΒωΠςΟϒ৮Δػೳ͸࢖͑ͳ͍ΜͰ͠ΐ? - > ͍͍͑ Plugin͕͋Γ·͢ (౰વྫ֎͸͋Γ·͕͢) - γϦΞϧίϯιʔϧ௨৴Ͱ෺ཧతͳσόΠεͱ઀ଓͯ͠ ৘ใΛૹड৴͢Δ͜ͱ͕Ͱ͖Δ - ࠓޙ Ճ଎౓ηϯαʔ΍GNSSड৴ػͷApp΋࡞͍ͬͯͭ͘΋ΓͰ͢ - Issue΋ͪΌΜͱಡΈ·͠ΐ͏ - ਂ໷Ͱ൑அྗ͕௿Լ͍ͯ͠Δͱ͖ʹॏཁͳ൑அΛ͠ͳ͍ํ͕ྑ͍

Slide 34

Slide 34 text

͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠! ࣭໰ɾؾʹͳΔ͜ͱ͕͋Ε͹ ͍ͭͰ΋࿈བྷ͍ͩ͘͞! Follow me on X: @YumNumm https: / / github.com/YumNumm/CO2SensorViewer