Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
FlutterでMLKitを使ってみる.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
sayurikunugi
August 28, 2018
2
1.3k
FlutterでMLKitを使ってみる.pdf
flutterでFirebase MLKitを使ってみる
sayurikunugi
August 28, 2018
Tweet
Share
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
37
7.1k
30 Presentation Tips
portentint
PRO
1
190
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
110
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
420
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Scaling GitHub
holman
464
140k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
900
Building an army of robots
kneath
306
46k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
96
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
170
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Skip the Path - Find Your Career Trail
mkilby
0
49
Transcript
Flutterで ML Kitを使ってみる
自己紹介 • エンジニア • 会社:HealtheeOne https://healtheeone.com • Android 7年くらい • Ios/Xcodeは未経験
• Flutterは2週間くらい…(初心者ですすみません) 簡単なOCRのモックプロジェクト作って、apk作るまでを1 週間くらいでやったので、その雑感をまとめます。
Flutterを始めたきっかけ • UI/画面遷移が単純な新規アプリを、Android/IOSで作る必 要が出てきた →Flutterで作れるかも? • 前からIOS興味あったし、 • Google I/Oでも取り上げられていたし、
どうせならモックからFlutterで作ってみよう!
ML Kitとは • 画像認識システム。機械学習機能も。 https://firebase.google.com/products/ml-kit/?hl=j a 「Image Labeling」-画像に写っているものをリス トアップできる 「Text
recognition 」 -文字を認識できる 「Face detection 」 -顔を認識する 「Barcode scanning 」 -バーコードを認識する 「Landmark detection 」 -有名な場所を認識する
Flutterで ML Kit • プラグイン https://pub.dartlang.org/packages/firebase_ml_ vision ※使った方 ⭐️ https://pub.dartlang.org/packages/mlkit
※official
Firebaseの設定 • https://codelabs.developers.google.com/codela bs/flutter-firebase/#4 • 注意 6. Platform-specific Firebase configuration
の手 中、 順 iOSは6まででOK ※6.Continuing in Firebase, follow the instructions to download the config file GoogleService-Info.plist.
サンプルプロジェクト紹介① https://github.com/sayurikunugi/flutter_mlkit_sample
サンプルプロジェクト紹介②
サンプルプロジェクト紹介③
大変だったところ① • Androidではデバッグアプリ動くんだけど、 iOSでビルドが通らない… • officialプラグインも非officialもダメ。 →githubで、両方ともissueしてみた • officialの方は「flutter doctorの結果を載せて」と返事
※issue時はflutter doctorの結果はマストらしい • 非officialの方は直してくれた 「 ios mlkit library has updated. I'll fix it soon! 」 • officialも更新してるので動きそう … プラグインのアップデート管理大変そう
大変だったところ② • APKのビルド https://flutter.io/android-release/ flutter build apk • apkを動かすとアプリがクラッシュ couldn't
find "libflutter.so" • flutter build apk --release --target-platform android-arm64 →使用端末では動いた • が、別の端末でcouldn't find "libflutter.so" →つづく
大変だったところ③ • CPUが32bitの端末らしい https://github.com/flutter/flutter/issues/18494 • 3.1.3以上のAndroidStudio使う or 32bit向けにapkをbuild build.gradle defaultConfig
{ ndk{ abiFilters "armeabi-v7a" }… } flutter build apk --release --target-platform android-arm
Flutter、 Dartの感想 • newはあっても無くてもどっちでもいいらしい • constがわかりにくい コンパイル時に作られるので、変数をパラメータにもったりす るとクラッシュしたり? • StatefulWidget:setState()するとbuild(onResume
みたいな)が走って画面が再描画される • file名!=クラス名。1ファイルに何クラスあってもok • レイアウトファイルがない
最後に • 始めたばかりだけど、おもしろい • UIパーツもプラグインも充実している • Issueは積極的に • 難読化、iOS向けリリースは今後のTODO •
これからもFlutterやってこうと思っているので、 よろしくお願いします!