Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
February 17, 2022 12:13 pm GMT

Primeiros passos em Dart, como instalar Dart SDK no Linux e compilar Hello World!!

Como instalar Dart SDK no Linux

Instalar usando apt-get:

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

Em seguida instalar Dart SDK:

sudo apt-get updatesudo apt-get install dart

Verificar a verso instalada:

dart --version

Image description

Como compilar Hello World em Dart:

Criar arquivo com extensao .dart

touch hello_world.dart

Criando Hello World em Dart:

void main() {  print("Hello, world");}

Como compilar o arquivo hello_world.dart

dart run hello_world.dart

Image description

Concluso:

Simples de compilar dart.


Original Link: https://dev.to/williamkoller/primeiros-passos-em-dart-como-instalar-dart-sdk-no-linux-e-compilar-hello-world-258g

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To