虎視眈々と

Flutter × Firebaseを研究するアプリエンジニア

Retoryのプライバシーポリシー

画像/メディア/ファイル 投稿した画像はクラウドサービスに保存するために使用します。保存先は「Firebase Storage」です Firebase storageはこちら→ https://www.firebase.com/terms/privacy-policy.html その他(ネットワーク接続の表示で使用します) クラ…

FlutterでFirebase Storageに画像をアップロードする

Firebase StorageのFlutterプラグイン、READMEにサンプルコードかかれてないんか、、、 pic.twitter.com/HydEW5aTcJ— shogo.yamada@Flutterマン (@yshogo87) June 21, 2019 なぜか現時点(2019/6/21)で Firebase StorageのFlutterプラグインの画面にサンプル…

FlutterでTextFieldをカスタマイズする

FlutterでおしゃれなTextForm作れた pic.twitter.com/svGBJjV6N5— shogo.yamada@Flutterマン (@yshogo87) June 8, 2019 上のツイートのようなもりもりにカスタマイズできます。 child: Center( child: Container( margin: const EdgeInsets.only(left: 10, r…

UICollectionView.reloadData() must be used from main thread onlyがでたとき

どうやらSwiftでreloadDataするときはメインスレッドでやらないといけないらしい 対処法は下記でいけた DispatchQueue.main.async { self.collctionView.reloadData() } (adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoo…

FlutterでAppBarの背景色を透明にする

下記の方法で行けた body: Stack( children: <Widget>[ Container( //My container or any other widget color: Colors.blue, ), new Positioned( //Place it at the top, and not use the entire screen top: 0.0, left: 0.0, right: 0.0, child: AppBar(title: Tex</widget>…

Findalizmプライバシーポリシー

画像/メディア/ファイル 投稿した画像はクラウドサービスに保存するために使用します。保存先は「Firebase Storage」です Fibrease storageはこちら→ Privacy Policy - Firebase カメラ(画像) 写真の撮影・プレビューに利用します 撮影された画像はグループ…

FlutterでGmailアプリのUIを作ってみる

作っている様子はこちら youtu.be 最終的にできたコードはこちら gist.github.com (adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoogle || []).push({});

FlutterでYouTubeアプリのUIを作ってみる

作っている様子は下記の動画をご覧ください youtu.be 最終的に書いたコードはこちら gist.github.com (adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoogle || []).push({});

FlutterでGmailアプリのUIを作ってみる

実際に作ってる様子はこちら youtu.be 最終的にできたコードはこちら gist.github.com (adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoogle || []).push({});

Flutterで旅行アプリのUIを作ってみる

作ってる様子はこちら youtu.be 最終的にできたコードはこちら gist.github.com (adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoogle || []).push({});

FlutterでTED アプリのUIを作ってみる

作っている様子はこちら youtu.be 最終的にできたコードはこちら gist.github.com (adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoogle || []).push({});

Flutterでボタンのテキストを右寄せにする

下記の方法でいけた FlatButton( onPressed: () {}, child: Container( width: double.infinity, child: const Text( "もっとみる", textAlign: TextAlign.right, ), ), ), (adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsby…

Flutterでバリデーションする

Flutter validationの実装も簡単でいいなー。自前でゴリゴリ書く必要ない。 pic.twitter.com/mtYQKakD3p— shogo.yamada@Flutterマン (@yshogo87) March 30, 2019 上の記事に書きてるようなバリデーション方法のやり方を載せておく class _EditProfileState e…

FlutterからFirebase Storageに画像をアップロードしてダウンロードURLを取得する

まずは下記のプラグインを導入します。 pub.dartlang.org 同時にFirebaseとFlutterの接続も忘れずに、 設定方法は下記をご覧ください。 firebase.google.com Future<String> saveUserProfileImage(File image) async { final StorageReference firebaseStorageRef = </string>…

Flutterでグーグルサインインボタンを出す

Flutterでグーグルサインインボタン簡単に出せた。 pic.twitter.com/lMPAY6aAKm— shogo.yamada@Flutterマン (@yshogo87) March 24, 2019 上のようないわゆるよくあるボタンである。 出し方は下記のプラグインを導入する pub.dartlang.org 実装はこんな感じ。…

Firebase Cloud FunctionsでJsonを返す

Cloud FunctionsからJsonを返す方法 下の実装では別のAPIを叩いて受け取った結果をjsonにして返却している。 const functions = require('firebase-functions'); const request = require('request'); exports.onBooksGenre = functions.https.onRequest((re…

FlutterでのAppBar3選

FlutterのAppbarについて3つ動画にして紹介しました。 www.youtube.com (adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoogle || []).push({});

Goでhttpリクエストしてjsonを受け取ってコマンドラインに出力する

go

下記のコードでいけた package main import ( "fmt" "io/ioutil" "net/http" ) func main() { client := &http.Client{} req, err := http.NewRequest("GET", "リクエストURL", nil) if (err != nil) { fmt.Println("error occur") } resp, err := client.Do…

RecyclerViewでアイテムのクリックイベントを受け取る

フラグメントにinterfaceを実装する。 interface ItemListEventListener { fun onTapItem(view: View, id: Int) } fragmentでimplementして実装を書く ここではinterfaceの実装と、adapterにイベントリスナーの実装を渡している class ItemListFragment : Fr…

AndroidのNavigationを使って遷移先にパラメーターを渡す

Navigationについてはこちら developer.android.com 渡す側 渡す側はbundleに引数を設定して、画面遷移するときに渡す val bundle = Bundle() bundle.putInt("id", id) Navigation.findNavController(view).navigate(R.id.action_item_list, bundle) 受け取…

FlutterとFirebase Authを使ってメールアドレス認証をする

FirebaseとFlutterの接続方法は下記 firebase.google.com 下記のプラグインを導入 pub.dartlang.org 導入したら下記のコードでログインできる Future<FirebaseUser> _handleSignUp(String email, String password) async { final FirebaseAuth _auth = FirebaseAuth.instan</firebaseuser>…

FlutterでBottom Sheetを出す

FlutterのBottom Sheet pic.twitter.com/8yh2csgrPA— shogo.yamada@Flutterマン (@yshogo87) March 10, 2019 下記の方法で行けた _showUserInfo(User user, BuildContext context) { showModalBottomSheet( context: context, builder: (_) { return Contain…

Flutterでドロワーを出す

drawer: Drawer() っていう一行でドロワーが出せるようになるFlutterすごすぎないか、、、しかも、iOS、Android両方動くって、、、爆速でアプリ作れる。 pic.twitter.com/96eHeCCvV1— shogo.yamada@Flutterマン (@yshogo87) March 5, 2019 ドロワーを出すだ…

FlutterでBLoCのテストを書く

FlutterでBLoCのテストを書く方法について BLoCって何?って方は下記の記事をご参照ください。 www.shogogeek.com BLoCクラス まずはBlocクラス class HomeBloc { final UserRepositoryInterface userRepository; HomeBloc({ @required this.userRepository,…

FlutterにFirebase Crashlyticsを導入する (Android編)

FlutterにFirebase プロジェクトを追加 下記の手順で導入しましょう。 firebase.google.com gradleを編集 android/build.gradle に下記を追加 buildscript { ext.kotlin_version = '1.3.20' repositories { google() jcenter() // ↓追加 maven { url 'https:…

FlutterでCrashlyticsが動かない時

FlutterでFirebase Crashlyticsがビルドエラーになって動かなかったが下記の方法で解決した。 android/gradle/gradle-wrapper.properties に下記を追加すると直る。 #Sat Mar 02 00:07:33 JST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrap…

Incompatible types: ○ and △ がでるとき

sealed を使って型の確認をするときに下記のエラーで表示できなくなった。 Incompatible types: ○ and △ みたいなエラーがでるときは下記の方法で使える ちゃんと継承させれば解決できる sealed class ListItem { data class ItemList( val list: List<ProductItem> ) : L</productitem>…

Androidでテキストを太字にする

下記の方法でいけた 簡単にいうと、 android:textStyle="bold" を設定するだけで太字になった。 <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="32dp" android:text="@string/item_list_title" android:textStyle="bold" android:textSize="20sp" /> (adsbygoogle = window.adsbygoogle |…</textview>

Firebaseのコンソールでユーザーを招待する

ユーザーの招待は下記の方法でできる。 コンソールに移動 ↓ 下記のボタンをタップ そこから「ユーザーと権限」ボタンをタップすればできる。 (adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoogle || []).push({});

Flutter(Dart)でシングルトン

class AnalyticsUtil { static FirebaseAnalytics _analytics; static FirebaseAnalytics getInstance() { if (_analytics == null) { return FirebaseAnalytics(); } return _analytics; } } (adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoo…