Flutterとは
- クロスプラットフォームでアプリ開発するフレームワーク
- 言語はDart
- Googleが開発してるOSS
- Material DesignのUIライブラリが豊富
- Hot Reloadなどの開発環境が整ってる
setup
自分の環境はMacなので、事前にXcodeは入れとく
$ git clone https://github.com/flutter/flutter.git
$ export PATH=`pwd`/flutter/bin:$PATH # 必要であれば.bashrcとかに書いとく
$ flutter doctor # 依存関係やらいい感じにしてくれるらしい(困ったらこれ叩くとアドバイスくれるっぽい)
# 色々やれとのこと
$ brew install --HEAD libimobiledevice
$ brew install ideviceinstaller
$ brew install ios-deploy
$ brew install cocoapods
$ pod setup
try
$ flutter create flutter_sample && cd flutter_sample
$ open -a Simulator
$ flutter run # コードの変更はターミナル上でrを押すと反映される
other
- VSCodeとか使うともっといい感じにHot Reloadできる
https://qiita.com/ozaki25/items/e765cc90cd6ace675e69 - フォーマッターもある
flutter format <filename>
(IntellijとVSCodeならプラグインがやってくれる) - エディタのサポートが手厚く、閉じタグの後にこんな感じでフォロー( // AppBar)が入る