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?

flutter 入門

Last updated at Posted at 2024-07-04

目的

  • Flutterの開発環境を構築する
  • 入門プロジェクトを作成して、起動する

flutter の開発環境構築

  1. Visual Studio Codeのインストール

  2. Flutter SDKのインストール
    https://docs.flutter.dev/get-started/install/windows/mobile#141-tab-panel
    ※インストーラーではないので、任意の場所に展開してからPathを通しておく
    ↓VScodeにFlutterのプラグインを追加
    image.png

  3. Android Studioのインストール
    https://developer.android.com/studio?hl=ja#get-android-studio

  4. Android Studioを起動して、SDK Managerから
    ↓「Android SDK Command-line Tools(latest)」をインストール
    image.png
    image.png

  5. Visual Studio 2022(コミュニティ)のインストール
    https://visualstudio.microsoft.com/ja/thank-you-downloading-visual-studio/?sku=Community&channel=Release&version=VS2022&source=VSLandingPage&passive=false&cid=2030
    ↓「C++によるデスクトップ開発」を含める
    image.png
    ↓ただ、ひたすらに待つ
    image.png


開発環境の確認

  1. VScodeを起動
  2. ターミナルを開く
  3. flutter doctorを実行
    ↓こんな感じになればOK(ダメな個所が有ったら、説明に従ってインストールし直す)
    image.png

プロジェクトを開始する

  1. 任意のフォルダでflutter create [ProjectName]を実行
    ↓プロジェクト名は「test_app」とした。 注)使用できる文字は[a-z0-9_]のみ
    image.png
  2. ディレクトリの移動 cd test_app
  3. Windows版で起動 flutter run -d windows
    image.png
    ↓こんな画面が表示されればOK
    image.png
  4. Web-server版で起動 flutter run -d web-server
    image.png
    ↓コンソールに表示されている通り http://localhost:51468にChromeでアクセス
    image.png
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?