Skip to content
Justice Tech School

Dart Data Types

Types: int, double, String, bool, List, Set, Map and null. num is the parent of int and double. dynamic turns checking off, so avoid it.

Example
int i = 42;
double d = 3.5;
String s = "dart";
bool ok = true;
num n = 7;
print(i + d);
print(i.runtimeType);

Exercise

Whole number type.

 n = 5;

Quiz Test

Which type holds decimals?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.