Complete Dart Guide

Learn Dart Programming in depth. Includes: basic to advanced topics, exercises, and projects. Fully updated to Dart 2.15

Last updated 2022-01-10 | 4.7

- Dart Programming Language in-depth
- How to write command line apps with Dart
- Fundamental concepts in programming: variables
- types
- control flow
- collections
- functions
- classes
- asynchronous programming & more

What you'll learn

Dart Programming Language in-depth
How to write command line apps with Dart
Fundamental concepts in programming: variables
types
control flow
collections
functions
classes
asynchronous programming & more
How to write clear and effective code using best practices
All the basics needed to understand Flutter
Angular Dart
and Dart on Backend

* Requirements

* A Windows
* macOS or Linux machine
* Enough free space to install Visual Studio Code and the Dart SDK

Description

Welcome to this full and complete course on the Dart language.

Dart is the language behind Flutter: Google's UI toolkit for building beautiful and fast native apps for iOS, Android, web and beyond.

With Dart you can build Flutter apps across all these different platforms with a single codebase.

According to GitHub, Dart was the fastest growing programming language in 2019, making it a very valuable language to learn.

Course overview

Covering all the fundamental concepts for Dart development, this is the most comprehensive and updated Dart course available online.

As a Google Developer Expert for Dart and Flutter, I'll teach you everything you need to know about Dart, even if you've never written a single line of code before.

This is a beginners course, but it goes well beyond the basics and teach you many advanced topics with clear diagrams and explanations.

Why is this important?

To make Flutter apps, you’ll use the Dart language every single day. If you want to go beyond simple apps, you must know and understand it well.

This course will prepare you for this, by covering the more advanced Dart features that are needed to build complex Flutter apps.

This Dart course also includes many exercises and practical projects. These will help you consolidate your knowledge as you make progress.

Included in this course

The course follows a carefully designed structure, and guides you through all these topics:

  1. Introduction

  2. Dart Basics

  3. Dart Type System

  4. Control Flow

  5. Project: Build a Command Line App

  6. Collections

  7. Project: Data Processing in Dart

  8. Null Safety

  9. Functions: Basics

  10. Functions: Advanced

  11. Classes: Basics

  12. Classes: Advanced

  13. Project: Simple eCommerce

  14. Mixins and Extensions

  15. Error Handling & Exceptions

  16. Asynchronous programming

  17. Project: Weather App

I will teach you the language features using Dartpad - a free online editor for writing Dart code.

Beyond that, you will also learn how to write command line applications in Dart, using Visual Studio Code.

As part of this, you will complete some real-world projects, and be prepared for the next steps in your programming journey.

Course Structure

I designed this course to be a step-by-step guide, as well as a reference that you can use to explore specific topics in depth.

If you're new to Dart and programming in general, this is a great place to start and you can follow the course from beginning to end.

Or if you already have some experience and you want to fill some gaps in your knowledge, you can jump right into the sections that are most relevant.

The course also comes with a complete GitHub page. This includes:

  • a complete list of all the course lessons, so that you can more easily find the content you need

  • all the course exercises, along with their solutions

  • all the course projects

By buying this course you'll have access to 10 hours of content as well as many exercises, and any bonus materials that I will include in the future.

Premium Support Included

You can ask questions if you get stuck. I'll do my best to answer all questions within 24 hours - but please keep them relevant to the course material.

Enroll Today

This is a great package, and by the end of this course:

  • you'll be comfortable with all aspects of the Dart Language.

  • you'll have a strong foundation that you can use as you continue your programming journey and learn about Flutter and beyond.

I'm very excited to share this course with you, so enroll now to get started.

Who this course is for:

  • Students who are new to Dart and programming in general
  • Experienced developers who want to dive into Dart & Flutter
  • Flutter developers who want to learn Dart more in-depth

Course content

18 sections • 184 lectures

How to make the most of this course Preview 03:35

Introduction to Dart Preview 04:13

Introduction to Dartpad Preview 02:05

Section Intro Preview 00:55

The main method Preview 01:21

Hello world Preview 01:55

Variable declaration and initialization Preview 03:24

Basic types Preview 02:47

[Exercise] Printing variables Preview 01:13

String concatenation & interpolation Preview 05:06

[Exercise] String interpolation Preview 01:46

String escaping Preview 04:00

Multi-line strings Preview 01:34

Basic String operations: uppercase and lowercase Preview 03:33

Initialization vs Assignment Preview 01:55

[Exercise] Lowercase and uppercase strings Preview 00:58

Finding and replacing strings Preview 04:24

Conversions between types Preview 04:29

Arithmetic operations Preview 03:31

[Exercise] Temperature conversion Preview 02:25

Increment & decrement operators Preview 03:16

Logical & Relational operators Preview 03:34

Ternary access operator Preview 02:24

Hex format, bitwise & shifting operators Preview 04:17

Comments Preview 04:12

Expressions & statements Preview 01:55

Section Intro Preview 00:49

Static vs Dynamic Languages Preview 03:41

Type inference with var Preview 01:11

The final keyword Preview 02:26

The const keyword Preview 02:20

[Exercise] var, final and const Preview 02:31

The dynamic keyword Preview 02:17

Section Intro Preview 00:37

If/else statements Preview 03:31

[Exercise] if/else statements Preview 02:43

while loops Preview 02:55

for loops Preview 02:48

[Exercise] fizz buzz Preview 03:20

break and continue Preview 03:50

switch statements Preview 03:37

Enumerations Preview 05:19

[Exercise] Simple Calculator Preview 02:36

Section Intro Preview 01:48

Installing the Dart SDK Preview 06:54

Installing and configuring VS Code Preview 04:06

Project Brief: Rock, Paper & Scissors Preview 02:10

Creating a command line app Preview 01:59

Pseudocode for the game logic Preview 01:50

Getting user input with stdin from dart:io Preview 04:03

Implementing the game loop Preview 02:43

Implementing the game logic Preview 08:55

Section Intro Preview 00:48

Lists Preview 04:01

[Exercise] Sum of the items in a list Preview 01:02

List methods Preview 03:36

Type annotations with lists Preview 01:53

Using var, final, const with lists Preview 02:26

Sets Preview 03:47

[Exercise] Sets Preview 02:09

Maps Preview 04:56

The as operator Preview 01:32

Null values Preview 01:24

Iterating on maps Preview 02:56

[Exercise] Pizza Ordering Preview 02:26

Nested Collections Preview 01:40

[Exercise] Restaurant ratings Preview 01:48

Collection-if Preview 02:48

Collection-for Preview 01:33

Spreads Preview 03:04

[Exercise] Shopping List Preview 02:13

Copying collections Preview 04:54

Section Intro Preview 02:29

Parsing command line arguments Preview 03:22

Reading files line by line Preview 03:31

Pseudocode for the processing logic Preview 02:25

Implementing the processing logic Preview 06:13

Introduction to Null Safety Preview 02:47

Nullable and non-nullable variables Preview 02:56

Flow Analysis: Promotion and Definite Assignment Preview 03:28

The assertion operator Preview 02:08

The if-null operator Preview 02:28

Null Safety with type inference Preview 01:25

Null Safety with collections Preview 02:23

The conditional access operator & the billion dollar mistake Preview 03:17

Section Intro Preview 00:58

Intro to functions Preview 01:30

Function arguments Preview 04:30

Return values Preview 01:59

[Exercise] Sum of a list of numbers Preview 02:25

Named and positional arguments Preview 02:35

Required and default values Preview 05:02

Default positional arguments Preview 02:16

[Exercise] Pizza ordering with functions Preview 02:36

Fat arrow notation (=>) Preview 01:29

The global and local scope Preview 02:22

Inner Functions Preview 02:00

Global mutable state and functions with side effects Preview 04:05

Section Intro Preview 00:43

Anonymous functions Preview 02:51

Functions as first class objects Preview 02:45

Function types Preview 03:37

Closures Preview 02:10

The forEach method Preview 03:44

The map method Preview 01:36

Iterable and toList() Preview 02:37

Code reuse with anonymous functions and generics Preview 07:49

The where and firstWhere methods Preview 03:10

[Exercise] Implement the where function Preview 02:43

[Exercise] Implement the firstWhere function Preview 03:35

The reduce method Preview 02:46

Combining functional operators Preview 06:01

Section Intro Preview 00:42

Introduction to classes Preview 03:52

Instance methods Preview 03:32

Class constructors and the this keyword Preview 01:59

Initializer lists and the shorthand syntax Preview 04:46

Classes with immutable members Preview 01:51

[Exercise] Creating a Person class Preview 02:58

Type safety with classes Preview 02:01

Const constructors Preview 02:35

Named constructors Preview 03:49

Named constructors: temperature example Preview 02:51

Getters and setters Preview 03:05

[Exercise] Restaurant ratings with classes Preview 02:58

Static methods and variables Preview 03:14

Private variables and methods Preview 05:28

Wrap up Preview 01:13

Section Intro Preview 01:24

VS Code Dart Setup with Null Safety Preview 07:30

Introduction to inheritance / subclassing Preview 04:17

The super constructor Preview 03:43

Overriding methods Preview 03:07

Abstract classes Preview 06:30

[Exercise] Area and Perimeter Preview 02:36

Interfaces and the difference between implements and extends Preview 05:31

The base Object class Preview 02:00

The toString() method Preview 02:51

The equality operator and the covariant keyword Preview 04:22

[Exercise] Implement the + and * operators Preview 01:49

Overriding hashCode and the Equatable package Preview 05:43

Using classes with generics Preview 03:16

Composition vs inheritance: Flutter widget hierarchy example Preview 03:49

Factory constructors and reading JSON data Preview 10:21

[Exercise] JSON Serialization Preview 03:03

Copying objects with copyWith Preview 03:57

The cascade operator Preview 04:15

Simple eCommerce app: Overview Preview 03:04

Creating the Product, Item, Cart classes Preview 02:27

Adding the interactive prompt Preview 07:07

Adding items to the cart Preview 05:53

Checkout functionality Preview 04:23

Project structure and wrap-up Preview 03:29

Section Intro Preview 01:27

Creating and using mixins Preview 04:42

Mixins: Drawbacks Preview 02:35

Extensions Preview 02:59

Extensions with generic type constraints Preview 04:10

[Exercise] Range extension Preview 02:20

Section Intro Preview 01:15

Errors vs Exceptions Preview 01:35

Assertions Preview 05:29

Exceptions: throw, try, catch, finally, rethrow Preview 07:45

[Exercise] Email validation Preview 03:23

Section Intro Preview 01:44

Futures, then, catchError, whenComplete Preview 05:04

async and await Preview 04:12

Future.value and Future.error Preview 02:36

[Exercise] Countdown with Futures Preview 03:10

Streams Preview 04:44

Stream generators: async* and yield Preview 03:51

[Exercise] Fizz-buzz with streams Preview 02:15

Stream constructors Preview 02:06

Stream methods Preview 03:40

Single / multiple subscription streams Preview 01:45

Additional documentation and resources about asynchronous programming

  • Asynchronous programming: futures, async, await: https://dart.dev/codelabs/async-await

  • Asynchronous programming: streams: https://dart.dev/tutorials/language/streams

  • Creating Streams in Dart: https://dart.dev/articles/libraries/creating-streams

Weather App Overview Preview 01:49

REST API Basics Preview 02:35

Creating the command-line app Preview 01:32

Creating a Weather API Client with the Dart http package Preview 05:48

Reading the response status code and data Preview 03:50

Completing the Weather API client Preview 04:14

Parsing JSON Data Preview 06:37

Error Handling and Wrap up Preview 07:30

BONUS Content & Next Steps Preview 01:37