BEST SITE FOR WEB DEVELOPERS


Dart Programming Language. W3Schools in English. Lessons for Beginners.

Ua Es De Fr Ru

Dart Tutorial


Learn Dart

Dart is a free programming language made by Google.

Dart is the language you use to build apps with Flutter.

You can also use Dart for command-line tools, servers and web apps.


Learning by Examples

With our "Try it Yourself" editor, you can edit Dart code and see the result.

Example

void main() {
  print('Hello World');
}
Try it Yourself »

Click on the "Try it Yourself" button to see how it works.


What You Will Learn

This tutorial teaches you the Dart language, from the first line of code to advanced features.

You will learn:

  • Variables, data types, strings and operators
  • Null safety, which stops many errors before your program runs
  • If...else, switch and loops
  • Lists, sets and maps
  • Functions, classes, inheritance, mixins and generics
  • Dart 3 features: records, patterns, switch expressions and sealed classes
  • Async code with futures, async/await and streams
  • Working with dates, math, JSON, regular expressions and files

Why Learn Dart?

  1. Dart is the language of Flutter, which builds apps for Android, iOS, the web and desktop from one code base
  2. Dart is easy to read if you know JavaScript, Java, C# or Kotlin
  3. Null safety and a strong type system find many mistakes before the program runs
  4. Dart is free and open source

Dart Exercises

Many chapters end with exercises, so you can test what you learned.

See all the exercises on the Dart Exercises page.


Prerequisites

You do not need to know another programming language before you start.

If you already know JavaScript, Java or Kotlin, many parts of Dart will feel familiar.