0Pricing
Dart Academy · Lesson

Nullable Types and the Question Mark

Mark when a value can be null.

The Billion-Dollar Bug

Null errors crash apps everywhere. Dart's null safety stops most of them before your program ever runs. ✨

Non-Nullable by Default

By default a Dart variable can never hold null. This int must always contain a real number.

int age = 30;

All lessons in this course

  1. Arrow Syntax for One-Line Functions
  2. Anonymous Functions and Closures
  3. Nullable Types and the Question Mark
  4. Null-Aware Operators: ?., ??, and !
← Back to Dart Academy