「Flutter」の版間の差分
ナビゲーションに移動
検索に移動
| 1行目: | 1行目: | ||
| − | ==Flutter== | + | ==[[Flutter]]== |
[[Dart]] | | [[Dart]] | | ||
| − | {{amazon| | + | {{amazon|B07LBP[[R]]HQD}} |
*https://flutter.dev/ | *https://flutter.dev/ | ||
| 12行目: | 12行目: | ||
====拡張パッケージ==== | ====拡張パッケージ==== | ||
*https://pub.dev/flutter/packages | *https://pub.dev/flutter/packages | ||
| − | ====Flutter Studio==== | + | ====[[Flutter]] Studio==== |
*https://flutterstudio.app/ | *https://flutterstudio.app/ | ||
==Install== | ==Install== | ||
| − | ===Mac=== | + | ===[[Mac]]=== |
*https://flutter.dev/docs/get-started/install/macos | *https://flutter.dev/docs/get-started/install/macos | ||
====インストール==== | ====インストール==== | ||
| 36行目: | 36行目: | ||
#プロジェクトディレクトリで、 | #プロジェクトディレクトリで、 | ||
##flutter run | ##flutter run | ||
| − | ====Firebase==== | + | ====[[Firebase]]==== |
#プロジェクトフォルダで以下を実行しXcodeで | #プロジェクトフォルダで以下を実行しXcodeで | ||
| − | ##open ios/ | + | ##open ios/[[R]]unner.xcworkspace |
[[File:0512_ios_bundle_id.png]] | [[File:0512_ios_bundle_id.png]] | ||
| − | ##Firebase にバンドルIDを登録 | + | ##[[Firebase]] にバンドルIDを登録 |
##cd ios | ##cd ios | ||
##pod setup | ##pod setup | ||
| 47行目: | 47行目: | ||
*http://typea.info/blg/glob/2019/10/xamarin-flutter.html | *http://typea.info/blg/glob/2019/10/xamarin-flutter.html | ||
| − | ==Firebase== | + | ==[[Firebase]]== |
| − | ===== | + | =====[[Flutter]]fire===== |
| − | *https://github.com/ | + | *https://github.com/[[Firebase]]Extended/flutterfire |
| − | ===Firebase Auth=== | + | ===[[Firebase]] Auth=== |
*https://pub.dev/packages/firebase_auth | *https://pub.dev/packages/firebase_auth | ||
=====example===== | =====example===== | ||
| − | *https://github.com/ | + | *https://github.com/[[Firebase]]Extended/flutterfire/tree/master/packages/firebase_auth/example |
| − | ===Google Sign in=== | + | ===[[Google]] Sign in=== |
*https://pub.dev/packages/google_sign_in | *https://pub.dev/packages/google_sign_in | ||
=====example===== | =====example===== | ||
*https://github.com/flutter/plugins/blob/master/packages/google_sign_in/example/lib/main.dart | *https://github.com/flutter/plugins/blob/master/packages/google_sign_in/example/lib/main.dart | ||
| − | ==Tips== | + | ==[[Tips]]== |
| − | === | + | ===[[Android]]X対応=== |
*[http://typea.info/blg/glob/2019/10/flutter-androidx.html AndriodX対応] | *[http://typea.info/blg/glob/2019/10/flutter-androidx.html AndriodX対応] | ||
===メニュー=== | ===メニュー=== | ||
| 75行目: | 75行目: | ||
*[http://typea.info/blg/glob/2019/10/flutter.html 画面遷移] | *[http://typea.info/blg/glob/2019/10/flutter.html 画面遷移] | ||
====呼び出し元==== | ====呼び出し元==== | ||
| − | + | [[R]]aisedButton( | |
onPressed: (){ | onPressed: (){ | ||
| − | + | Na[[vi]]gator.push( | |
context, | context, | ||
| − | + | MaterialPage[[R]]oute(builder: (context) => Second[[R]]oute()), | |
); | ); | ||
}, | }, | ||
| 86行目: | 86行目: | ||
import 'package:flutter/material.dart'; | import 'package:flutter/material.dart'; | ||
| − | class | + | class Second[[R]]oute extends StatefulWidget { |
@override | @override | ||
State<StatefulWidget> createState() { | State<StatefulWidget> createState() { | ||
| − | return | + | return _Second[[R]]outed(); |
} | } | ||
} | } | ||
| − | class | + | class _Second[[R]]outed extends State<Second[[R]]oute> { |
@override | @override | ||
Widget build(BuildContext context) { | Widget build(BuildContext context) { | ||
| 110行目: | 110行目: | ||
===DB=== | ===DB=== | ||
====Sqlite==== | ====Sqlite==== | ||
| − | *https://flutter.ctrnost.com/logic/sqlite/ | + | *https://flutter.ctrnost.com/logic/[[sqlite]]/ |
*[http://typea.info/blg/glob/2019/12/flutter-sqlite.html sqfliteパッケージの利用] | *[http://typea.info/blg/glob/2019/12/flutter-sqlite.html sqfliteパッケージの利用] | ||
2020年2月16日 (日) 04:26時点における版
Flutter
Dart |
https://images-na.ssl-images-amazon.com/images/P/B07LBPRHQD.09.MZZZZZZZ.jpg RHQD/typea09-22 link
SDK
Widget
拡張パッケージ
Flutter Studio
Install
Mac
インストール
- sdkダウンロード
- unzipで解凍
- .bash_profile にPATH登録
- flutter doctor コマンドで必要な作業のチェックとヘルプ
実行
- xcodeのダウンロード
- command line tools の有効化
- sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
- cocoapods のインストール
- sudo gem install cocoapods
- pod setup
- シミュレーターの起動
- open - a Simulator
- プロジェクトの作成
- flutter create my_app
- プロジェクトディレクトリで、
- flutter run
Firebase
- プロジェクトフォルダで以下を実行しXcodeで
- open ios/Runner.xcworkspace
- Firebase にバンドルIDを登録
- cd ios
- pod setup
- https://developers.google.com/identity/sign-in/ios/start-integrating
環境構築
Firebase
Flutterfire
- https://github.com/FirebaseExtended/flutterfire
Firebase Auth
example
- https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_auth/example
Google Sign in
example
Tips
AndroidX対応
メニュー
ドロワーメニュー
return Scaffold( appBar: AppBar(), drawer: Drawer(), body: Center(), );
画面遷移
呼び出し元
RaisedButton( onPressed: (){ Navigator.push( context, MaterialPageRoute(builder: (context) => SecondRoute()), ); }, child: const Text('Open Second Screen'),
呼び出し先
import 'package:flutter/material.dart'; class SecondRoute extends StatefulWidget { @override State<StatefulWidget> createState() { return _SecondRouted(); } } class _SecondRouted extends State<SecondRoute> { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(), body: Center(), ); } }
Dialog
画像選択
画像切り抜き
DB
Sqlite
© 2006 矢木浩人
