2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

flutterメモ

Last updated at Posted at 2020-09-21

メモ of メモ。

便利補完

// stfulと打つと、IDEが下記を生成
class Hoge extends StatefulWidget {
  @override
  _HogeState createState() => _HogeState();
}

class _HogeState extends State<Hoge> {
  @override
  Widget build(BuildContext context) {
    return Container();
  }
}

// stlessと打つと、IDEが下記を生成
class Hoge extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container();
  }
}

Auto Format 自動フォーマット command+option+L

同一ワード選択同時編集(sublimeのcmd+D): ctr+G

定義にジャンプする: ⌘B

バージョン指定

Dart - Caret Syntax

For example, ^1.2.3 is equivalent to ‘>=1.2.3 <2.0.0', and ^0.1.2 is equivalent to '>=0.1.2 <0.2.0’.

つまり

firebase_auth: ^0.5.10

の場合は、'>=0.5.10'で。'<0.6.0'ということ。

No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp() in Flutter and Firebase

Firebase.initializeApp()が必要になった。
このstackoverflow見るべし。
https://stackoverflow.com/questions/63492211/no-firebase-app-default-has-been-created-call-firebase-initializeapp-in

The method 'findAncestorStateOfType' was called on null

この辺りが参考になった。

[FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzao@fe1e944

androidの方で、minsdkversionを21にすると発生。
Firebaseのauthが突然動かなくなって結構ハマった。
この辺かなと思ってみてたが違う模様で、

iphone実機にて「“iproxy”は、開発元を検証できないため開けません。」

この辺で対応。

iOS14以上での実機にて。How to change debug mode in Flutter app on iOS 14+ to launch it multiple times

image.png
これ見るとOK
https://www.youtube.com/watch?v=3I8yrpXoPok

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?