Free · 19 topics · no sign-up
Dart notes for students
Topic-wise Dart notes with code examples, common mistakes and practice questions with answers. Read them on any phone, free, with no sign-up.
These notes follow the free BrainBit Infotech Teaching Dart course, from your first print() to null safety, classes, records and patterns, async code, streams, JSON and algorithms. Each topic explains the idea in plain English, shows short programs you can run in DartPad or with the Dart SDK, lists the mistakes beginners make and ends with practice questions. Read them in order if you are new to programming, or jump to the topic your class is on. Dart is the language of Flutter, so these notes are also the first step to building apps. For revision before a test, use the printable cheat sheet.
Part 1: Foundations
- Introduction to Dart: your first programWhat Dart is, where it runs, main(), print(), comments, DartPad and reading error messages.
- Dart variables, data types and constantsint, double, String, bool, var, final, const, type conversion and string interpolation.
- Dart operators and numbersArithmetic, ~/ and %, comparison, logical and assignment operators, ternary and dart:math.
- Dart strings and textQuotes, interpolation, string methods, split and join, substring, StringBuffer and comparison.
Part 2: Logic, Functions and Collections
- Dart control flow: decisions and loopsif, else if, else, switch, for, for-in, while, do-while, break, continue and nested loops.
- Dart functionsParameters, return values, optional and named parameters, arrow functions, callbacks and recursion.
- Dart lists and iterablesCreating and changing lists, sorting and searching, map, where, fold, spread and collection for.
- Dart maps and setsMap key-value pairs, entries, putIfAbsent and update, sets, set maths and JSON-like data.
Part 3: Safe and Object-Oriented Dart
- Dart null safetyNullable types, ?. ?? ??= and !, type promotion, late variables and required parameters.
- Dart classes and objectsFields, methods, constructors, named and const constructors, privacy with _, getters, setters and static.
- Dart inheritance, interfaces and mixinsextends, super, overriding, polymorphism, abstract classes, implements, mixins, is and as.
- Dart enums, records and pattern matchingEnums, enhanced enums, records, destructuring, switch expressions, patterns and sealed classes.
Part 4: Advanced Dart, Errors and Async
- Dart generics, extensions and operatorsGeneric classes and functions, bounds, extension methods, operator overloading, callable classes, typedef.
- Dart errors and exceptionsKinds of errors, try/catch/finally, on, throw, custom exceptions, rethrow and assert.
- Asynchronous Dart: Future, async and awaitFutures, async and await, error handling, timeout, Future.wait and the event loop.
- Dart streams, generators and timersStreams, listen and await for, transforms, sync* and async* generators, StreamController and timers.
Part 5: Libraries, Tooling and Projects
- Dart core libraries: JSON, dates and moredart:math, JSON encode and decode, fromJson, DateTime, Duration, RegExp, Uri, Stopwatch and stdin.
- Dart packages, testing and debuggingProject layout, pubspec.yaml, pub.dev packages, imports, unit tests, debugging, format and analyze.
- Data structures and algorithms with DartBig-O, linear and binary search, three sorts, recursion, stack, queue, linked list and hashing.