a-installation-and-tools

A Installation and Tools

 

A.1  Installation: Dart2

In order to run Dart on your machine, you’ll need to install the Dart SDK.

Dart 2

The following instructions install Dart 2. This book will be using Dart 2, and Dart 1 will not work. If you already have the Dart SDK on your machine, ensure that it’s version 2.0.0 or greater!

Installing the Dart SDK is straight forward, if you use the command line.

The command line

Many instructions in this book will involve running commands in your machines command line. I’m a big fan of GUI’s, and don’t use the command line much. You don’t need to be a command line wizard to use this book. Just know that anytime you see a line of code that starts with a $, it’s a command for your terminal. The following is used to show the return value. For example, the command which dart in the OSX terminal returns the file path to your Dart SDK.

$ which dart
=> /usr/local/bin/dart

Installation differs depending on what operating system you use.

A.1.1  Mac OS

First, if you’re using a Mac, it’s likely that you have a program called Homebrew on your computer. If not, you need to install it. Homebrew is a command line program that lets you download and manage software packages from the terminal.

We can install it easily from the command line. First, check to see if its installed:

Warning

If you’re copying and pasting command line commands, be sure to remove the first $.

$ brew -v

If your terminal prints Homebrew 1.x.x, then you’re good to go. Otherwise, run

A.1.2  Windows

A.1.3  Linux

A.2  Installation: Flutter SDK

A.2.1  Mac OS

A.2.2  Windows

A.2.3  Linux