0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VSCodeでHello Flutter

Posted at

背景

下記でFultterをインストールできたので、次のステップとしてサンプルのアプリケーションを立ち上げてみました。
エディタは普段使用しているVSCodeを選択しました。

やったこと

  1. Flutter拡張機能のインストール
  2. Flutter拡張機能の設定
  3. プロジェクトの作成
  4. シミュレータで動作確認

1. Flutter拡張機能のインストール

VSCode左サイドバーの拡張機能タブから検索し、Flutter拡張機能をインストールします。
flutter_0001.png

2. Flutter拡張機能の設定

左下の歯車マークからSettingsを選択します。
flutter_0003.png

右上のページと矢印のアイコンを選択すると、settings.jsonの編集画面に遷移します。
flutter_0004.png

"dart.flutterSdkPath": "{/path/to/flutter/sdk}"を追加します。
筆者の環境では、"dart.flutterSdkPath": "/Users/cremarch/fvm/default"としました。
flutter_0005.png

3. プロジェクトの作成

コマンドパレットを開き、Flutter: New Projectを選択します。
flutter_0006.png

Applicationを選択します。
flutter_0007.png

プロジェクトを作成する先のディレクトリを選択します。
flutter_0008.png

プロジェクト名を入力します。
flutter_0009.png

Yes, I trust the authorsを選択します。
flutter_0010.png

雛形が作成されました。
flutter_0011.png

4. シミュレータで動作確認

作成したアプリケーションをシミュレータで起動してみます。

左サイドバーからFlutter拡張機能のタブを選択します。
flutter_0012.png

右下のChrome(web-javascript)を押下して、シミュレータのリストからStart iOS Simulatorを選択します。
flutter_0013.png

シミュレータが起動しました。
この状態で右上のデバッグ開始ボタンを押下します。
flutter_0014.png

アプリケーションが起動しました🎉
flutter_0015.png

Appendix

Androidのシミュレータで動作確認
flutter_0016.png

mac OSのシミュレータで動作確認
flutter_0017.png

webのシミュレータで動作確認
flutter_0018.png

以上で、サンプルアプリケーションの動作確認ができました。

参考文献

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?