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とfirebaseを使ってモバイルアプリに挑戦してみる
Search
Masaya Nasu
April 02, 2018
Technology
3
2.9k
Flutterとfirebaseを使ってモバイルアプリに挑戦してみる
Flutterとfirebaseを使ってモバイルアプリを作ろうとしている話。
サンプルコード
https://github.com/nasum/flutter_firebase_playground
Masaya Nasu
April 02, 2018
Tweet
Share
More Decks by Masaya Nasu
See All by Masaya Nasu
What's new in Go 1.23
nasum
0
71
カミナシのフロントエンド開発の効率化の取り組み
nasum
2
260
新参者だけどバーンアウトしかけているチームを立て直す
nasum
21
11k
DjangoではじめるGraphQLとフロントエンド開発の協業
nasum
1
3.3k
grpc-gatewayで作るマイクロサービスの管理画面
nasum
1
7.5k
コストをかけずに機械学習の環境を整える&学習環境(人間の)
nasum
0
1.6k
Elixirの好きなところ
nasum
0
480
ElectronでFirebaseを使ってみた(仮)
nasum
2
3.3k
Vue.jsを導入する際失敗したこと
nasum
1
4.1k
Other Decks in Technology
See All in Technology
Copilotの力を実感!3ヶ月間の生成AI研修の試行錯誤&成功事例をご紹介。果たして得たものとは・・?
ktc_shiori
0
350
「隙間家具OSS」に至る道/Fujiwara Tech Conference 2025
fujiwara3
7
6.5k
re:Invent 2024のふりかえり
beli68
0
110
0→1事業こそPMは営業すべし / pmconf #落選お披露目 / PM should do sales in zero to one
roki_n_
PRO
1
1.5k
20250116_JAWS_Osaka
takuyay0ne
2
200
自社 200 記事を元に整理した読みやすいテックブログを書くための Tips 集
masakihirose
2
330
Alignment and Autonomy in Cybozu - 300人の開発組織でアラインメントと自律性を両立させるアジャイルな組織運営 / RSGT2025
ama_ch
1
2.4k
KMP with Crashlytics
sansantech
PRO
0
240
Accessibility Inspectorを活用した アプリのアクセシビリティ向上方法
hinakko
0
180
AIアプリケーション開発でAzure AI Searchを使いこなすためには
isidaitc
0
110
Goで実践するBFP
hiroyaterui
1
120
シフトライトなテスト活動を適切に行うことで、無理な開発をせず、過剰にテストせず、顧客をビックリさせないプロダクトを作り上げているお話 #RSGT2025 / Shift Right
nihonbuson
3
2.1k
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
240
Scaling GitHub
holman
459
140k
How to train your dragon (web standard)
notwaldorf
89
5.8k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
The Invisible Side of Design
smashingmag
299
50k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
500
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
Side Projects
sachag
452
42k
Building an army of robots
kneath
302
45k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
173
51k
Transcript
FlutterͱfirebaseΛ ͬͯϞόΠϧΞϓϦ ʹઓͯ͠ΈΔ Firebase Japan User Group / meetup /
3 ಹਢཧ
ࣗݾհ • ಹਢཧ ීஈRailsͱ͔Ͱ͓ࣄͯ͠·͢ • Twitter : @tomato360 GitHub: @nasum
• Vue.js͕͖
ࢲͱfirebase
ͪΐͬͱલʹগ͠৮ͬͯͨ https://speakerdeck.com/nasum/ electrondefirebasewoshi-tutemita-jia
࠷ֶۙͼͯ͠·͢ श࡞ɿMarkdownEditor https://spellnote.com/
৽͍͠ςʔϚΛࡧத
Flutter
Flutter • Google • ϞόΠϧΞϓϦ։ൃϑϨʔϜϫʔΫ • ΫϩεϓϥοτϑΥʔϜ • Dartʢʂʁ
Flutterͱfirebase͍͍Έ߹Θͤ ʢݸਓͷҙݟ • Flutter • ΫϩεϓϥοτϑΥʔϜ • firebase • αʔόϨε
• ࠷খͷͷΛ࠷Ͱ࡞Εͦ͏ͳΠϝʔδ
༻ײΛ୳ͬͯΈΔ
firebase auth buildscript { repositories { google() jcenter() } dependencies
{ classpath 'com.android.tools.build:gradle:3.0.1' classpath 'com.google.gms:google-services:3.2.0' } } android/build.gradle
firebase auth apply plugin: 'com.google.gms.google-services' android/app/build.gradle
firebase auth import 'package:google_sign_in/google_sign_in.dart'; import 'package:firebase_auth/firebase_auth.dart'; lib/main.dart
firebase auth final FirebaseAuth _auth = FirebaseAuth.instance; final GoogleSignIn _googleSignIn
= new GoogleSignIn(); lib/main.dart
firebase auth void _handleSignIn() async { GoogleSignInAccount googleUser = await
_googleSignIn.signIn(); GoogleSignInAuthentication googleAuth = await googleUser.authentication; FirebaseUser siginUser = await _auth.signInWithGoogle( accessToken: googleAuth.accessToken, idToken: googleAuth.idToken, ); setState(() { user = siginUser; }); } lib/main.dart
firebase auth if (user != null) { displayName = new
Text(user.displayName); email = new Text(user.email); avator = new CircleAvatar(backgroundImage: new NetworkImage(user.photoUrl)); } lib/main.dart
firebase auth
ग़དྷͨը໘
ͪΌΜͱAnalyticsಈ͘
firebase auth • ඞཁͳϥΠϒϥϦ • google_sign_in https://pub.dartlang.org/packages/google_sign_in • firebase_auth https://pub.dartlang.org/packages/firebase_auth
• ίʔυྫ • https://github.com/nasum/flutter_firebase_playground/ commit/66acc51fc6d67258dfb4b0194b3dcac72ff8992a
firebase auth ༻ײ • FirebaseUserͷΠϯελϯεΛ࡞ΕOK • JS൛ͱ༻ײࣅ͍ͯΔ
DartͷϥΠϒϥϦͷϖʔδ
cloud firestore import ‘package:cloud_firestore/cloud_firestore.dart'; QuerySnapshot snapShot = await Firestore.instance.collection(‘memo').getDocuments(); Firestore.instance
.collection('memo') .document() .setData({'text': _inputText}); lib/main.dart
cloud firestore
cloud firestore void _getDocument(List<Widget> list) async { QuerySnapshot snapShot =
await Firestore.instance.collection('memo').getDocuments(); setState(() { snapShot.documents.forEach((DocumentSnapshot ds) { SizedBox box = new SizedBox( width: 300.0, height: 50.0, child: new Card(child: new Text(ds.data['text'])), ); list.add(box); }); }); } lib/main.dart
ग़དྷͨը໘
cloud firestore
cloud firestore
cloud firestore • ඞཁͳϥΠϒϥϦ • cloud_firestore https://pub.dartlang.org/packages/cloud_firestore • ίʔυྫ https://github.com/nasum/
flutter_firebase_playground/commit/ 16960fb4ceafe0f1ed5bc85eb388a722e4739079
cloud firestoreײ • ༻ײJSͷͱࣅ͍ͯΔ • ࠷৽ͷ0.3.2Λ͏ͱίϯύΠϧग़དྷͳ͍ ʢཁௐࠪ • Ή͠ΖFlutterͷঢ়ଶཧͰۤ࿑ͨ͠
·ͱΊ • JSಉ༷ʹDart൛ָʹ͑Δ • FlutterͱDartʹ׳Εͳͯۤ͘࿑ͨ͠ʢ׳Εͷ • ΫϩεϓϥοτϑΥʔϜͱαʔόϨε࠷ڧͳؾ ͕͍ͯ͠Δ • ΞϓϦΛͭ͘Γ͍ͨਓʹ͓קΊ͍ͨ͠Έ߹Θͤ
αϯϓϧίʔυ • https://github.com/nasum/flutter_firebase_playground