Dart is a statically typed language — every value has a type. Dart's type system is sound, meaning it catches type errors at compile time. The core built-in types are:
Type
Description
Example
int
Integer (whole numbers)
42
double
Floating-point numbers
3.14
num
Either int or double
100 or 3.5
String
Text / character sequences
'Hello'
bool
True or false
true
List
Ordered collection
[1, 2, 3]
Set
Unordered unique collection
{1, 2, 3}
Map
Key-value pairs
{'a': 1}
Null
Absence of value
null
Numbers
int age = 25;
int hexValue = 0xCAFE; // hexadecimal
double pi = 3.14159;
double scientfic = 1.5e4; // 15000.0
num score = 98; // can be int or double
Strings
String single = 'Hello';
String double_ = "World";
String multi = '''
This is a
multi-line string
''';
String interpolated = 'Sum: $${3 + 4}'; // Sum: 7
Dart has a rich set of built-in types including int, double, String, bool, List, Set, Map, and Null. Dart's sound null safety prevents null reference errors by default. Add ? to a type to allow null values.