Dart
The language behind Flutter.
Dart is taught here in 13 lessons, running from Dart syntax and null safety through to From Dart to Flutter. Each lesson takes one topic, shows the working code, and links onward to the next, so the course can be read straight through in order.
| Track | Programming Languages |
| Lessons | 13 |
| Level | Beginner to intermediate |
| Reading time | about 3 hours |
| Prerequisites | Helpful, but not required: Lua |
Lessons
- Dart syntax and null safetyvar, final and const, sound null safety with ? and !, and the collection syntax you use in every file.
- Classes, futures and streamsConstructors, inheritance and mixins, then async/await, error handling and the difference between a Future and a Stream.
- Isolates, compilation and packagingWhy heavy work freezes the event loop, how to move it to another isolate, and the commands that turn a project into an executable.
- Collections and functional iterationUse List, Set and Map well, spread and collection-if, and transform data with where, map and fold instead of manual loops.
- Functions, closures and typedefsUse named and optional parameters, tear-offs and closures correctly, and give function types names that document their contract.
- Records, patterns and switch expressionsReturn multiple values with records, destructure them with patterns, and use sealed classes for exhaustive switches.
- Generics, extensions and operator overloadingWrite generic code with bounds, add behaviour to types you do not own, and implement == and hashCode so value types behave.
- Errors, exceptions and async error handlingTell Error from Exception, catch with on and finally, and handle failure in Futures and Streams without losing the stack trace.
- Files, JSON and HTTP in daily DartRead and write files with dart:io, decode JSON safely, make HTTP requests with timeouts, and retry the failures worth retrying.
- Packages, pubspec and project layoutWrite a pubspec, manage version constraints and lock files, structure a package, and know what publishing requires.
- Testing Dart codeStructure suites with package:test, assert with matchers, control time with fake_async, and stub collaborators cleanly.
- Command-line tools: args, stdin and exit codesParse argv with package:args, read stdin, work with the file system, and compile a self-contained executable.
- From Dart to FlutterHow widgets consume Dart, what a build method really does, where state lives, and what changes in the Flutter toolchain.
More in Programming Languages
FAQ
How long does the Dart course take?
It has 13 lessons, about 3 hours of reading. Expect roughly twice that if you type out and run every example.
Do I need prior experience for Dart?
Not strictly. It helps to have read Lua first, because some lessons build on it, but every lesson explains its own assumptions.
What should I read after Dart?
Continue with VBA (14 lessons), the next course in Programming Languages.