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

MyMemoWiki

「Flutter」の版間の差分

提供: MyMemoWiki
ナビゲーションに移動 検索に移動
34行目: 34行目:
 
#command line tools の有効化
 
#command line tools の有効化
 
##sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
 
##sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
 +
##sudo xcodebuild -runFirstLaunch
 
#cocoapods のインストール  
 
#cocoapods のインストール  
 
##sudo gem install cocoapods
 
##sudo gem install cocoapods
43行目: 44行目:
 
#プロジェクトディレクトリで、
 
#プロジェクトディレクトリで、
 
##flutter run
 
##flutter run
 +
 
====[[Firebase]]====
 
====[[Firebase]]====
 
#プロジェクトフォルダで以下を実行しXcodeで
 
#プロジェクトフォルダで以下を実行しXcodeで

2020年4月11日 (土) 11:01時点における版

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

  1. プロジェクトフォルダで以下を実行しXcodeで
    1. open ios/Runner.xcworkspace

0512 ios bundle id.png

    1. Firebase にバンドルIDを登録
    2. cd ios
    3. pod setup
  1. https://developers.google.com/identity/sign-in/ios/start-integrating


[✗] Xcode - develop for iOS and macOS

   ✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
     Download at: https://developer.apple.com/xcode/download/
     Or install Xcode via the App Store.
     Once installed, run:
       sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
       sudo xcodebuild -runFirstLaunch
   ✗ CocoaPods not installed.
       CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
       Without CocoaPods, plugins will not work on iOS or macOS.
       For more info, see https://flutter.dev/platform-plugins
     To install:
       sudo gem install cocoapods

環境構築

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