| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

「Flutter」の版間の差分

提供: MyMemoWiki
ナビゲーションに移動 検索に移動
タグ: モバイルウェブ編集 モバイル編集
タグ: モバイルウェブ編集 モバイル編集
61行目: 61行目:
 
[[File:ios_firebase.png]]
 
[[File:ios_firebase.png]]
 
[[File:firebase_sdk.png]]
 
[[File:firebase_sdk.png]]
 
+
[[File:google_service_info_plist.png]]
 
Integrating client project
 
Integrating client project
 
Pod installation complete! There is 1 dependency from the Podfile and 4 total pods installed.
 
Pod installation complete! There is 1 dependency from the Podfile and 4 total pods installed.

2020年4月13日 (月) 14:47時点における版

Flutter

Dart |


SDK

Widget

拡張パッケージ

Flutter Studio

UIをデザイナで作成できる

Install

Mac

開発者登録

インストール

  1. sdkダウンロード
  2. unzipで解凍
  3. .bash_profile にPATH登録
  4. flutter doctor コマンドで必要な作業のチェックとヘルプ

実行

  1. xcodeのダウンロード
  2. command line tools の有効化
    1. sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
    2. sudo xcodebuild -runFirstLaunch
  3. cocoapods のインストール
    1. sudo gem install cocoapods
    2. pod setup
  4. シミュレーターの起動
    1. open - a Simulator
  5. プロジェクトの作成
    1. flutter create my_app
  6. プロジェクトディレクトリで、
    1. flutter run

Firebase

  • プロジェクトフォルダで以下を実行しXcodeで

0512 ios bundle id.png

  • 開発者IDを登録

Flutter xcode sign.png

Flutter pod google signin.png

  • iPhoneでデベロッパーを信頼
    • 「設定」>「一般」>「プロファイル」または「プロファイルとデバイス管理」の順にタップします。 「エンタープライズ App」見出しの下に、該当する開発元のプロファイルが表示されます。 「エンタープライズ App」見出しの下で開発元のプロファイルの名前をタップし、その開発元を信頼するように設定

Ios firebase.png Firebase sdk.png Google service info plist.png Integrating client project Pod installation complete! There is 1 dependency from the Podfile and 4 total pods installed.

[!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`). delhi:ios hirotoyagi$

環境構築

Firebase

Flutterfire

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