0
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 5 years have passed since last update.

【Flutter】最初のアプリを作るまで

0
Last updated at Posted at 2020-04-05

概要

Flutterのインストール、最初のアプリを作って立ち上げるまでを備忘録的に書き残しておきます。

公式サイト

Flutterのインストール

インストール方法は2通りあります。

zipからのインストール

macの方はこちらから最新のzipをインストールします。
https://flutter.dev/docs/get-started/install/macos

ソースからのインストール

$ git clone https://github.com/flutter/flutter.git -b stable

この様な形でソースコードをcloneしてきてインストールすることもできます。

環境パスの設定

$ export PATH="$PATH:`pwd`/flutter/bin"

を実行して、環境パスの設定をします。
僕はfishを使っているのでこちらでやりました。
fish shellのPATH設定

flutter doctorの実行

flutterでは実行環境が整っているかどうかなどをチェックしてくれるdoctorと言うサブコマンドが実装されています。
こちらを実行するとAndroid toolchainやAndroid studioがインストールされていないことが示唆されますが、今回は無視します。

iPhone Simulatorの起動

$ open -a Simulator

これでシミュレータが起動します。

flutterアプリの作成

flutter create [app_name]

これで app_name と言うアプリが生成されます。1分くらいかかります。

flutterアプリの起動

flutter run

これでちょっと待てば先ほど立ち上げたシミュレータ上にてサンプルアプリが立ち上がるはずです。

また、 ios/Runner.xcworkspace を開き普通に実行しても起動することができます。

入門書

僕は入門書としてこちらを使っています。

Flutter入門

基本的なUIの組み方、基本的なUIの構成要素(ラベル、ボタン、スイッチやスライダー...)、など基本的なことは
載っているのでおすすめです!

誰かのお役に立てば。

0
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
0
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?