Dart Tutorial

Dart Tutorial: Learn Dart and Flutter from Beginner to Advanced

Learn Dart programming the easy way, then build real apps with Flutter. 107 short Dart lessons and a complete Flutter course, with simple examples you can run and edit in the browser and an exercise after every lesson.

Covers Dart 3 and current Flutter with Material 3. Free, no sign-up, works on any device.

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.');
}
Output
1. Welcome, Asha!
2. Welcome, Bikram!
3. Welcome, Chen!
3 people started Dart today.
Course 1 Dart 15 chapters, 107 lessons The language: basics, functions, collections, null safety, OOP, async, Dart 3 features and tooling. Course 2 Flutter 20 chapters, 135 lessons on flutter.dart-tutorial.dev The framework: widgets, layout, state management (Riverpod, Bloc, Provider, GetX), APIs, Flame games, projects and release.

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. 1

    Getting Started with Dart

    What Dart is, how to install it, and how to write, run and comment your first program.

    6 lessons · Beginner

  2. 2

    Dart Basics

    Variables, data types, numbers, strings, booleans, operators and reading input: the building blocks of every Dart program.

    10 lessons · Beginner

  3. 3

    Control Flow

    Make decisions with if, else and switch, repeat work with loops, and control exactly when a loop stops or skips.

    6 lessons · Beginner

  4. 4

    Functions

    Write reusable blocks of code: parameters, return values, arrow syntax, closures, higher-order functions and recursion.

    7 lessons · Beginner

  5. 5

    Collections

    Store and process groups of values with lists, sets and maps, then filter, transform and combine them.

    11 lessons · Beginner

  6. 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.

    3 lessons · Intermediate

  7. 7

    Object-Oriented Programming

    Model real things with classes and objects: constructors, inheritance, interfaces, mixins, enums, generics, extensions and more.

    19 lessons · Intermediate

  8. 8

    Records and Patterns

    The Dart 3 features that changed everyday code: records, destructuring, pattern matching, switch expressions and sealed classes.

    4 lessons · Intermediate

  9. 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 · Intermediate

  10. 10

    Asynchronous Programming

    Write code that waits without freezing: futures, async and await, streams, the event loop, isolates and generators.

    12 lessons · Advanced

  11. 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.

    7 lessons · Advanced

  12. 12

    Libraries and Packages

    Organise code into files and libraries, control what you import, use packages from pub.dev and publish your own.

    4 lessons · Advanced

  13. 13

    Practical Dart

    The everyday skills of real projects: JSON, HTTP requests, dates and times, regular expressions, command-line apps and testing.

    6 lessons · Advanced

  14. 14

    Tools and Performance

    Format, lint, debug, log and profile your Dart code, and understand how memory and garbage collection work.

    6 lessons · Advanced

  15. 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.

    4 lessons · Advanced

The Flutter course

From installing the SDK to publishing apps and games on Google Play and the App Store, with every state management approach explained. The Flutter course has its own home on flutter.dart-tutorial.dev. Begin there once the Dart basics feel comfortable.

Open the Flutter course Flutter roadmap

A Dart tutorial for beginners that goes all the way to advanced

This Dart tutorial teaches the Dart programming language from zero, then the Flutter framework for building apps for Android, iOS, the web and desktop from one codebase. You do not need any programming experience. Each lesson explains one idea in plain English, shows it in a short Dart example with its output, and ends with an exercise.

Not sure where to begin? Follow the free Dart and Flutter roadmap, or open the Dart online compiler and start typing.

What you will learn

In the Dart course (learn Dart programming):

In the Flutter tutorial (learn Flutter step by step, on flutter.dart-tutorial.dev):

Practice: Dart examples, exercises and interview questions

Reading is not enough. These pages turn what you learned into skill:

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.

Learners use Dart Tutorial from the USA, Canada, the UK and Europe, Australia, India, Nepal and everywhere else Flutter is used. The lessons are in simple English so they are easy to follow wherever you are.

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.

Can I run Dart code online without installing anything?

Yes. The Dart online compiler on this site runs Dart and Flutter code in your browser. Every example with a Run button opens in an editor where you can change the code and run it again.

What is the best way to learn Dart programming?

Follow the lessons in order, type and run every example, change it to see what happens, and finish the exercise at the end of each lesson. Then solve the 30 Dart programming examples and build one small project before moving on to Flutter.

Is Dart similar to JavaScript?

The syntax looks similar and both have async and await, so JavaScript developers learn Dart quickly. The main differences are that Dart is statically typed with sound null safety and compiles to fast native code for Flutter apps.

Dart Tutorial is an independent learning resource, written and kept up to date by a Flutter and Dart developer. Found a mistake or want a topic covered? Get in touch.