Guide Book

Guide Book

A reference you can read front to back or dip into. Every chapter explains the syntax, and most topics have a πŸ” Behind the scenes section you can open to see what Python is actually doing, the details classes usually skip. Look for 🧭 Scenario cards for real-world uses, and press Try it on any example, then open the Inspect tab to look inside.

  1. Chapter 1How Dart runs your codeTwo compilers, one language β€” JIT for development, AOT for production, and what that means for everything you write.
  2. Chapter 2Variables, final & const`var`, `final`, `const` and `late` β€” four ways to bind a name, and the compile-time versus run-time line that separates them.
  3. Chapter 3Null safetySound null safety β€” what the compiler proves, the operators for working with nullable values, and why `!` should make you uncomfortable.
  4. Chapter 4Numbers, strings & core typesint and double and the one platform difference that matters, string interpolation and runes, and the core library types you will use daily.
  5. Chapter 5CollectionsList, Set and Map, the Iterable methods that do most of the work, laziness, and the collection-if/for literals that make Dart's literals unusual.
  6. Chapter 6Functions & closuresPositional, named and optional parameters, functions as values, closures, cascades and the tear-off syntax.
  7. Chapter 7Classes, mixins & extensionsConstructors and their many forms, inheritance versus mixins versus interfaces, the class modifiers, and extending types you do not own.
  8. Chapter 8Records & patternsAnonymous tuples with named fields, and the pattern language that destructures them β€” plus exhaustive switch expressions.
  9. Chapter 9AsynchronyThe event loop, Future and async/await, Stream and async*, error handling across await points, and isolates for real parallelism.
  10. Chapter 10Errors & exceptionsThe Error/Exception split, `on` versus `catch`, rethrow, stack traces, assertions, and where `Result`-style returns beat throwing.
  11. Chapter 11Generics & the type systemType parameters and bounds, why Dart's generics are reified, variance, and the casts that can still fail at run time.
  12. Chapter 12Libraries, packages & toolingImports and visibility, `pubspec.yaml` and version constraints, the analyser, and the core libraries worth knowing.
main.dart
Loading editor…
Dart runs on your computer
The website can't run Dart. Write your code here and compare it with the solution (the lightbulb).

Search

Jump to a lesson or a past run