0
3

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

Win10のIntelliJ IDEAにてDartでHello Worldを書く

Last updated at Posted at 2020-11-08

前提

IntelliJ IDEA
Dart SDK
をインストールされました。

IntelliJ IDEAのインストール手順は少々お待ちくださいね。
Flutter SDKをインストールすると、Dart SDKは自動的にインストールされました。
Flutter SDKのインストールは下記の記事に記載しています。
Win10にてFlutterの開発環境構築ーーFlutter SDK Install(2020年保存版)

本文は三つの部分を分けています。
● Dart Pluginインストール
● 新規プロジェクト
● Hello Worldを書く

Dart Pluginインストール

IntelliJ IDEAを開いて、下のConfigureボタンをクリックして
tempsnip.png
プルダウンのPluginsをクリックして、プラグイン画面がポップアップします。
tempsnip2.png
Dartを検索して、右のインストールボタンを押して、
tempsni4.png
インストールした後でOKボタンを押します。
tempsnip4.png

新規プロジェクト

IntelliJ IDEAを開いて、New Projectをクリックして
tempsnip7.png

Dartを選択して、インストールされたDart SDK Pathを選択して、Nextボタンを押下して
tempsnip5.png
プロジェクト名前と場所を書いて、Finishボタンを押下します。
tempsnip6.png

Hello Worldを書く

Dart-Basicプロジェクトを選択して、右クリックして、New→Directory
tempsnip8.png
Directory名を入力して、Enterを押して
キャプチャ.PNG
先ほど作成したchapter1というDirectoryを選択して、右クリックして、New→Dart File
tempsnip9.png
Dart File名を入力して、Enterを押します。
キャプチャ3.PNG
hello_world.dartにて下記のコードを書きましょう。

void main(){
  print("Hello World!");
}

hello_world.dartというファイルを選択して、右クリックして、「Run 'hello_world.dart'」をクリックします。
tempsnip1.png
コントロールにて下記の結果が出ますと、正確に実行されました。
キャプチャ4.PNG

以上です。ここまで読んでいただきまして、ありがとうございました。
もし何か質問があれば、遠慮なくコメントしてくださいね。

またね。:smiley:

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?