Learn Dart and Flutter, from your first line to a published app
Two free courses that go in order. 185 short lessons, each with code you can run in the browser and an exercise to try yourself.
Covers Dart 3 and current Flutter with Material 3. No sign-up.
void main() {
final learners = ['Asha', 'Bikram', 'Chen'];
for (final (i, name) in learners.indexed) {
print('${i + 1}. Welcome, $name!');
}
final total = learners.length;
print('$total people started Dart today.');
}1. Welcome, Asha! 2. Welcome, Bikram! 3. Welcome, Chen! 3 people started Dart today.
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: Scaffold(
body: Center(child: Text('Hello, Flutter!')),
),
);
}
}One codebase. Runs on Android, iOS, web, Windows, macOS and Linux.
The Dart course
Start at chapter 1 if you are new to programming. If you already know another language, skim the first three chapters and slow down at null safety.
- 1
Getting Started with Dart
What Dart is, how to install it, and how to write, run and comment your first program.
- 2
Dart Basics
Variables, data types, numbers, strings, booleans, operators and reading input: the building blocks of every Dart program.
- 3
Control Flow
Make decisions with if, else and switch, repeat work with loops, and control exactly when a loop stops or skips.
- 4
Functions
Write reusable blocks of code: parameters, return values, arrow syntax, closures, higher-order functions and recursion.
- 5
Collections
Store and process groups of values with lists, sets and maps, then filter, transform and combine them.
- 6
Null Safety
Understand nullable and non-nullable types, the null-aware operators, and late variables, so null errors are caught before your code runs.
- 7
Object-Oriented Programming
Model real things with classes and objects: constructors, inheritance, interfaces, mixins, enums, generics, extensions and more.
- 8
Records and Patterns
The Dart 3 features that changed everyday code: records, destructuring, pattern matching, switch expressions and sealed classes.
- 9
Error Handling
Deal with things going wrong: catch exceptions with try and catch, clean up with finally, and define your own exception types.
2 lessons
- 10
Asynchronous Programming
Write code that waits without freezing: futures, async and await, streams, the event loop, isolates and generators.
- 11
Files and Directories
Read, write, check and delete files, work with folders and paths, and handle file system errors using the dart:io library.
- 12
Libraries and Packages
Organise code into files and libraries, control what you import, use packages from pub.dev and publish your own.
- 13
Practical Dart
The everyday skills of real projects: JSON, HTTP requests, dates and times, regular expressions, command-line apps and testing.
- 14
Tools and Performance
Format, lint, debug, log and profile your Dart code, and understand how memory and garbage collection work.
- 15
Dart Next Steps
Take your Dart skills further: build practice projects, prepare for interviews, keep a cheat sheet handy, then move on to Flutter.
The Flutter course
From installing the SDK to publishing on Google Play and the App Store. Begin here once the Dart basics feel comfortable.
- 1
Getting Started with Flutter
What Flutter is, how to install it, and how to create, run and understand your first app.
- 2
Widgets
The building blocks of every Flutter screen: stateless and stateful widgets, the widget lifecycle, text, buttons, images and containers.
- 3
Layout
Arrange widgets on screen with rows, columns, stacks, lists and grids, and understand how Flutter decides sizes.
- 4
Material Design and App Structure
Build complete screens with Scaffold, app bars, navigation bars, drawers, tabs, cards, dialogs and themes.
- 5
User Input and Forms
Collect input with text fields, validated forms, checkboxes, switches, sliders, pickers and gestures.
- 6
Navigation and Routing
Move between screens, pass data back and forth, and set up URL-based routing with go_router.
- 7
State Management
Keep your UI in step with your data: setState, lifting state up, InheritedWidget, ChangeNotifier, Provider, Riverpod and Bloc.
- 8
Async UI and Networking
Show data that arrives later: FutureBuilder, StreamBuilder, HTTP requests, JSON models, loading and error states, and pagination.
- 9
Storing Data
Keep data on the device with shared_preferences, files and SQLite, and in the cloud with Firebase.
- 10
Animations
Bring an app to life with implicit and explicit animations, hero transitions, custom page routes and custom painting.
- 11
Responsive and Adaptive Design
Make one app look right on small phones, large phones, tablets, foldables, desktops and the web.
- 12
Device Features and Plugins
Use the camera, gallery, location, links, sharing and other native features through plugins, and call native code yourself.
- 13
Testing, Debugging and Quality
Test your widgets, find bugs with DevTools, keep the app fast, and make it usable in every language and by everyone.
- 14
App Architecture
Organise a growing Flutter app: folder structure, layers, MVVM with repositories, dependency injection and environment configuration.
- 15
Building and Releasing
Prepare an app for release: icon, splash screen and name, then build and publish for Android, iOS, web and desktop, and automate it.
- 16
Flutter Next Steps
Practice projects, interview questions and a cheat sheet to turn what you have learned into real skill.
What you will learn #
The two courses start from zero and end with the skills used in real projects. Each lesson explains one idea, shows it in a short program, and finishes with an exercise.
In the Dart tutorial:
- The fundamentals. Variables, data types, strings, numbers, operators, conditions and loops.
- Functions and collections. Parameters, closures, higher-order functions, lists, sets and maps.
- Null safety. How Dart stops null errors before your program runs.
- Object-oriented programming. Classes, constructors, inheritance, interfaces, mixins, enums, generics and extensions.
- Modern Dart 3. Records, patterns, switch expressions, sealed classes and class modifiers.
- Asynchronous code. Futures, async and await, streams, the event loop and isolates.
- Practical skills. Files, JSON, HTTP requests, dates, regular expressions, packages, testing and debugging.
In the Flutter tutorial:
- Widgets and layout. Stateless and stateful widgets, rows, columns, stacks, lists, grids and slivers.
- Material Design. App bars, navigation, dialogs, themes and dark mode.
- Input and navigation. Forms, validation, gestures, routes and go_router.
- State management. setState, ChangeNotifier, Provider, Riverpod and Bloc.
- Data. HTTP, JSON models, loading states, local storage, SQLite and Firebase.
- Polish. Animations, responsive layouts for phones, tablets and desktop, accessibility and localization.
- Shipping. Testing, performance, architecture, and releasing on Android, iOS and the web.
How to use this site #
Read the lessons in order the first time. Run every example and change it to see what happens: that is where most of the learning takes place. Use the search box, or press /, to jump to a topic in either course. Mark lessons as done to keep track of where you are. Your progress is stored in your own browser and nowhere else.
Questions people ask before starting
What is Dart used for?
Dart is a programming language from Google. It is best known as the language of Flutter, which builds Android, iOS, web and desktop apps from one codebase. Dart is also used for command-line tools and server-side programs.
Is Dart easy to learn for beginners?
Yes. Dart has a clean, consistent syntax, helpful error messages and a type system that catches mistakes while you type. If you have never programmed before, start at chapter 1 of the Dart course and follow the lessons in order. If you know JavaScript, Java, Kotlin or C#, most of Dart will feel familiar.
Should I learn Dart or Flutter first?
Learn the Dart basics first: variables, functions, classes, null safety, collections and async. Every Flutter widget is a Dart class, so Flutter code is much easier to read once you know the language. You do not need to finish the whole Dart course before starting Flutter. The first seven chapters are enough to begin.
How long does it take to learn Dart and Flutter?
With about an hour a day, most beginners finish the core Dart chapters in four to six weeks, and can build simple Flutter apps a month or two after that. Developers who already know another language move faster.
Do I need to install anything to follow these tutorials?
Not to begin. Examples with a Run button open in DartPad, the official online editor, and that includes many Flutter examples. Each course has a lesson on installing the tools on Windows, macOS and Linux when you are ready.
Which versions do the tutorials cover?
The Dart course covers Dart 3, including sound null safety, records, patterns, sealed classes and class modifiers. The Flutter course uses current stable Flutter with Material 3.
Can I build Android and iOS apps with Flutter?
Yes. One Flutter codebase builds apps for Android, iOS, the web, Windows, macOS and Linux. The Flutter course ends with lessons on publishing to Google Play and the App Store.
Are the tutorials free?
Yes. Every lesson is free to read, with no sign-up and no paywall.