Variables

int number = 10;

We can use methods with types

10.isEven
// true

3.14159.round()
// 3

Dynamic typing

dynamic myVariable;
myVariable = 10;      // OK
myVariable = 3.14159; // OK
myVariable = 'ten';   // OK

myVariable.runtimeType // returns the type

//// 
// you can also use 
object? var;
// this forces the user of the var to check its type
// you do not need to check the type for dynamic

Type Inference

var someNumber = 10;
// or
num someNumber = 10;

someNumber = 15;      // OK
someNumber = 3.14159; // No, no, no.

Const & Final

const a = 1; // must be known at compile time

final b = val; // val cannot be changed but, can be determined after compalation

Incrementers

var counter = 0;

counter += 1;
// counter = 1;

counter -= 1;
// counter = 0;
var counter = 0;
counter = counter + 1;
counter = counter - 1;
var counter = 0;
counter++; // 1
counter--; // 0
double myValue = 10;

myValue *= 3;  // same as myValue = myValue * 3;
// myValue = 30.0;

myValue /= 2;  // same as myValue = myValue / 2;
// myValue = 15.0;