Check out example codes for "dartlang ubuntu". It will help you in understanding the concepts better.

Code Example 1

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

Code Example 2

$ sudo apt-get update
$ sudo apt-get install apt-transport-https
$ sudo 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'

Learn ReactJs, React Native from akashmittal.com