coderef

Dart Quick Reference

Dart essentials (Flutter's language): variables, null safety, strings, collections, functions, classes and async.

5 sections · 24 snippets · updated Oct 14, 2026

Click any snippet to copy it.

Basics

Variables and output.

  • Main
  • Variables
  • Interpolation
  • Convert

Null safety

Nullable types.

  • Nullable
  • Default / safe call
  • Assert non-null
  • Late initialisation

Collections

Lists, maps and sets.

  • List
  • Transform
  • Sort
  • Reverse
  • Map
  • Collection if / for
  • Spread

Functions & classes

Reuse and types.

  • Function
  • Class
  • Named constructor
  • Inheritance / mixin
  • Enum

Async

Futures and streams.

  • Async function
  • Wait for several
  • Try / catch
  • Stream

← All quick references