Variables and types

Dart is a typed language: a variable has a type, declared explicitly or inferred with var. final forbids reassignment after initialization, while const denotes a value known at compile time. These keywords make the code safer and more readable.

Example

var nom = 'Léa';
final age = 30;
const pi = 3.14159;

Related concepts

The whole glossary