Starting Dart

  1. Windows Installation
    1. Using a PowerShell
    2. Using a setup wizard
  2. Linux/Ubuntu Installation
  3. Hello World
  4. References

[Get the Dart SDK] (https://dart.dev/get-dart)

Windows Installation

Using a PowerShell

with Windows PowerShell

> Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
> choco upgrade chocolatey
  • Install using Chocolatey

with Windows PowerShell

> choco install dart-sdk
> choco install dart-sdk --pre
> choco upgrade dart-sdk

Using a setup wizard

Linux/Ubuntu Installation

Install using apt-get Perform the following one-time setup:

$ sudo apt-get update
$ sudo apt-get install apt-transport-https
$ sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
$ sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'

Then install the stable release of the Dart SDK:

 $ sudo apt-get update
 $ sudo apt-get install dart

Or, to install the dev release of the Dart SDK, run the one-time setup commands followed by:

 $ sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_unstable.list > /etc/apt/sources.list.d/dart_unstable.list'
 $ sudo apt-get update
 $ sudo apt-get install dart

Hello World

void main() {
  print('Hello, World!');
}
> dart hello_world.dart

References

https://riptutorial.com/ko/dart/example/2848/installation-or-setup


© 2018. All rights reserved.

Powered by Hydejack v8.4.0