
Learn Dart from basics to advanced concepts by watching videos, coding along, and using exercises, a GitHub repository with a complete syllabus, and Q/A to practice and master the language.
Explore the Dart language, the backbone of Flutter, and learn how it enables cross‑platform apps with fast development via hot reload and fast execution via JIT and AOT.
Explore the Dartpad online editor to write and run Dart code in your browser, using the left code editor, the right console, and the documentation panel, with null safety toggle.
Explore the basics of the Dart language, including variables, basic types, initialization versus assignment, strings, numeric types, and operators. Practice writing simple programs through exercises.
Discover how the main method acts as the entry point for a Dart program, enabling it to run; learn to define void main() and verify no errors before adding functionality.
Write and run your first Dart program using the main method and print statements to display Hello world and I like learning, with indentation managed by the Dart formatter.
Declare and initialize Dart variables with a string, then print the value to the console, showing how memory stores and retrieves data using camelCase names like name.
Explore the built-in types String, int, double, and bool, and learn to declare variables, print values, and understand case sensitivity in Dart.
Learn to define four variables—firstName, lastName, age, and height—initialize them, and print each to the console with four print statements in Dart.
Master string construction in Dart by using concatenation with + and interpolation with $variable and ${expression}. Print strings with double quotes and insert name, age, and height, including simple expressions.
Practice string interpolation in Dart by building a program with variables, print statements, and comments to produce three interpolated lines that update when values change.
Explains string escaping in Dart by showing single and double quotes, backslashes, and raw strings, and demonstrates escaping the dollar sign and backslash for correct output, highlighting consistency.
Explore how to work with single, double, and multi-line strings in Dart, using the newline character and triple-quoted syntax to print multi-line text efficiently.
Discover string operations in Dart, including converting to uppercase and lowercase and performing find and replace, by applying methods like toUpperCase and toLowerCase with the dot operator.
Explore initialization versus assignment in Dart by using toLowerCase and toUpperCase on a string, then reassigning a declared variable while noting illegal pre-declaration usage.
Learn string manipulation in Dart by defining a string variable with the value 'Dart Course', printing it, then reassigning it to uppercase and finally to lowercase using toUpperCase and toLowerCase.
Learn how to check if a string contains a substring using contains, replace text with replaceAll, and name variables clearly in Dart through practical examples.
Learn to convert between Dart types using toString and toStringAsFixed, parse strings to numbers with double.parse, and convert ints to doubles with toDouble, or apply floor, round, ceil, and truncate.
Describe arithmetic operations in Dart, covering +, -, *, /, integer division (~/), and modulo; demonstrate augmented assignment (+=) for int and double, and explain operator precedence with examples.
Practice converting Fahrenheit to Celsius in Dart with the formula (tempFahrenheit - 32) / 1.8, printing 86F = 30C and using toStringAsFixed(1) to show one fractional digit.
Explore postfix and prefix increment and decrement in Dart, using x, y, and z to show how x++ and ++x yield different results, and learn to print with string interpolation.
Explore how relational and logical operators in Dart produce boolean results for conditional logic and control flow, including precedence, not operations, and email validation examples.
discover how the dart ternary operator uses condition ? exprIfTrue : exprIfFalse to return values, assignable to a variable, and requires a boolean expression with matching types.
Explore hex notation and bitwise and shifting operators in Dart. Use 0x literals and ARGB colors to demonstrate or, and, xor, not, and shifts with base conversions.
Learn how to use comments in Dart to document code and guide readers. Use single line (//, ///) and multi-line (/* */) comments and understand when to write them.
Explore the difference between expressions and statements in Dart, with examples of literals and print statements. Learn that expressions yield values and can be assigned, while statements do not.
Explore the Dart type system by examining static and dynamic typing, type inference, and the var, final, const, and dynamic keywords; learn how to use them effectively.
Explore the difference between statically and dynamically typed languages, how static type checking happens at compile time, and why Dart and other statically typed languages improve reliability, readability, and performance.
Discover how dart's type inference via the var keyword infers int, double, and string types from initializers in a statically typed language, enabling safe reassignment.
Learn to declare read-only variables using the final keyword in Dart to prevent changes and reduce bugs. Discover type inference and why final is preferred to var.
Explore the const keyword in Dart, learn how const builds compile-time constants for performance, and compare const with final and var to set read-only, single-assignment variables.
Analyze a Dart exercise to see when to use var, final, and const, focusing on compile-time constants, string literals, and string interpolation, and when to create a new const.
Learn how the dynamic keyword in Dart lets a variable take any type, contrasting with var, final, and const. Note its use for JSON data and why type safety matters.
Explore Dart control flow statements, including if/else, while and for loops, switch statements, and enumerations. Practice using break and continue inside loops and switches through hands-on exercises.
Explore how to use if/else statements in Dart to write conditional code that prints ticket types and prices based on age, with real examples like junior, senior, and regular tickets.
practice defining netSalary and expenses in Dart, use if/else to compare them, print messages with string interpolation, and verify outcomes with different values.
Learn how to use while loops in Dart by initializing a counter, evaluating a boolean condition, and incrementing to avoid infinite loops, including printing i times a character.
Learn to rewrite a Dart while loop as a for loop with concise initialization, condition, and update steps, achieving the same output, while commenting out the old code for comparison.
Implement fizz buzz in Dart with a for loop from 1 to 15. Use the modulo operator and logical and to print fizz, buzz, fizz buzz, or i when divisible.
Explore how break and continue control loops in Dart with a fizz buzz example; break exits loops, continue advances to the next iteration, and done prints at the end.
Master switch statements in Dart by mapping cases to outcomes using break and default, demonstrating readability benefits over long if/else chains with medal examples.
Explore Dart enumerations by defining a Metal enum with gold, silver, bronze, and no metal. Switch on Metal values, print the name, access Metal.values, and look up by name.
Implement a simple calculator using a switch statement for plus, minus, multiply, and divide, printing the input and result like 4 + 2 = 6. Practice Dart control-flow concepts.
Move beyond language features by building a Dart command line app, such as rock-paper-scissors, and set up the Dart SDK with Visual Studio Code for local development.
Install the Dart SDK using a package manager or by downloading a zip, and add the Dart bin to your path on macOS, Windows, or Linux.
Install Visual Studio Code for Dart development, install the Dart extension, enable the code command on macOS, and explore Dracula, Bracket Pair Colorizer 2, and Error Lens extensions.
Build a command line two-player rock, paper and scissors game in Dart, reading console input, generating random moves, and applying the rules to decide winners.
Create a Dart command line app by setting up a project folder, writing a main method, and running the program with the Dart VM to print hello world.
Explore how to implement rock, paper, scissors game logic in Dart by writing pseudocode, prompting for user input, validating moves, generating a random AI choice, and looping until quit.
Learn to read console input in dart by importing dart:io, using stdin and readLineSync to capture input, and stdout.write to prompt on the same line for rock, paper, scissors.
Implement a rock, paper, scissors game loop with a while true prompt, using if/else input validation and break on q to quit.
Master implementing rock, paper, scissors game logic in Dart using enums for moves and a random ai choice. Manage user input, print moves, and determine win or draw outcomes.
Explore collections in Dart, including lists, sets, and maps, and learn type system, type inference, collection-if, collection-for, and spreads for easier list handling in Flutter apps.
Define a values variable that holds the list [1, 3, 5, 7, 9], iterate with a for loop, accumulate the sum in sum, and print the result 25.
Explore basic list operations in Dart, checking length and isEmpty/isNotEmpty, accessing first and last, and modifying lists with add, insert, removeAt, and clear while using contains and indexOf.
Learn how to use type annotations with list literals in Dart, enforcing List<String> and preventing non-string elements, while preserving type inference with var, final, and const.
Learn how var, final, and const interact with lists in Dart, including final's one-time assignment with mutable contents, and const's compile-time restriction and runtime error.
Explore sets in Dart as collections of unique values, declare with curly braces, access via elementAt, and use union, intersection, and difference to combine and compare sets.
Learn to work with sets in Dart by computing the elements that belong to either a or b but not both, then print and sum them with a for loop.
Explore maps in Dart, learning to store key-value pairs with unique keys, access and update values using the subscript operator, and specify dynamic or explicit types.
Learn how to use the as operator to cast a dynamically typed name to String, enabling all String methods, and compare it with explicit type declarations as an alternative.
Explore how accessing a missing map key yields null, the dart keyword meaning no value, and how to test for null with if (weight == null).
Explore how to iterate through map key-value pairs using for-in loops, including keys, values, and entries, and print results for clearer Dart data handling.
Practice calculating a pizza order total in Dart by using a map of prices, a list of orders, and a for loop, while handling unavailable items and printing the total.
Explore nested collections in Dart by building a list of restaurants as maps with names, cuisines, and lists of ratings, then iterate with for-in to print results.
Practice handling nested collections in Dart by calculating each restaurant's average rating and adding an avgRating key to every restaurant in a list.
Explore collection-if, collection-for, and spreads in Dart to build lists conditionally and more readably; see how addBlue and addRed control color entries in a colors list without regular if statements.
Explore Dart's collection-for to initialize a colors list by iterating over extraColors and adding items on the fly, replacing addAll with a single, inline collection literal.
Master the spread operator, collection-if, and collection-for to compose lists, sets, and maps in Dart. See how these features improve Flutter code readability in declarative UI.
Rewrite the shoppingList in Dart using collection-if, collection-for, and the spread operator to produce the same output, improving readability and eliminating unnecessary curly braces.
explain how copying collections in Dart differs from simple assignment, showing that references share memory, and teach how to create an actual copy with the spread operator.
Explore data processing in Dart by building a command line tool that reads a local CSV from spreadsheets, processes lines, and groups totals by activity type to generate a report.
Build a Dart command line app to process a csv file by reading command line arguments, validating input, showing usage, and exiting with appropriate codes.
Download the csv file from the course github, open it in vscode, then read its contents line by line with File(inputFile).readAsLinesSync and print each line.
Parse a csv and compute time spent by activity using pseudo code. Create a durationByTag map, skip the header, split lines by comma, extract duration and tag, and print totals.
Implement a Dart data processing flow that parses a CSV, builds total duration by tag with a map, handles missing tags as 'unallocated', and prints per-tag totals plus overall total.
Discover nullable and non-nullable types in Dart, and learn how null safety—enabled by Dart 2.12 and Flutter 2.0—guards against null values and how to work with or without older code.
Explore nullable and non-nullable variables in Dart by comparing Dartpad with and without null safety, showing compile-time safeguards and how to declare nullable types with a question mark.
Explore flow analysis in Dart, showing how nullable and non-nullable variables are promoted and safely used after null checks, and how definite assignment enables late initialization of non-nullable locals.
Demonstrate how to use the assertion (bang) operator to assign a nullable value to a non-nullable variable in Dart, with runtime risk if the value is null.
Master the if-null and assertion operators in Dart to assign a value when a value is null, avoiding runtime errors, with examples like maybeValue ?? 0 and augmented assignment.
Explore null safety and type inference in Dart, showing how initializing variables lets you use var, final, or const while Dart infers types and handles nullable versus non-nullable.
Learn how null safety affects collections in Dart, including lists of strings, optional nulls, and nullable types. Iterate over cities, perform toUpperCase, and apply a null check to safely print.
Learn how to leverage null safety and the conditional access operator in Dart to safely call methods on nullable values, avoiding the billion-dollar mistake.
Explore Dart functions as building blocks, declare, argument passing, return values, named and positional arguments, default values, required values, null safety, arrow notation, lexical scope, inner functions, and pure functions.
Learn how functions encapsulate code to organize programs and enable reuse by defining a function and calling it from the main method.
Learn to use function arguments in Dart by defining a describe function that takes name and age, passes variables or literals, and reduces code duplication while respecting types and order.
Learn how Dart functions can return values, switch from void to String, and use the return value to describe a person by name and age with a reusable describe function.
Create a dart function sum that takes a list of doubles, iterates to accumulate values, returns a double, and prints results for empty and non-empty lists (0, 3, 10).
Learn how Dart uses positional and named arguments with the describe function to improve clarity. See how curly braces switch to named arguments, and note null-safety considerations.
Explore how named arguments are optional by default and how null safety changes that, requiring you to choose between making them nullable, assigning default values, or marking them as required.
Learn how to declare optional positional arguments with default values in Dart. Mix positional and named arguments, leverage null safety, and understand compile-time checks for defaults and omissions.
Extracts a total calculation into a calculateTotal function that takes an order list and returns a double, teaching function scope and parameter choices.
Learn how the fat arrow notation (=>) in Dart replaces braces and return statements for single-statement functions, including a void example.
Explore the lexical scope in Dart, including local and global scopes, and see how variables are resolved by the nearest scope. Learn how same-name variables can exist in different scopes.
Discover inner functions in Dart, where moving a function inside main grants access to the enclosing, local, and global scopes, and learn why inner functions are rarely used.
Explore global mutable state and side effects in Dart, distinguishing between pure functions and mutating global variables, and learn safer patterns for state management.
Explore anonymous functions and closures, passing functions as arguments with function types, and use map, where, and reduce on collections with generics for a type-safe functional style in Dart.
Explore anonymous functions in Dart by declaring and using them like closures, assigning to a variable, and invoking with arguments to produce outputs such as 'Hi Andrea'.
Explore how functions become first-class objects in Dart by assigning anonymous functions to variables and passing functions as arguments, with a welcome example that demonstrates function types and type safety.
Define a named function type with typedef to improve readability when passing functions as arguments, and reuse it with the Greet alias for functions like sayHi, sayBonjour, sayHola.
Learn about closures and anonymous functions in Dart, using outside variables in map, and see how function types and functions as arguments enable build-up design pattern in Dart and Flutter.
Explore the forEach, map, where, and reduce methods for collections in Dart, learn generics and using functions as arguments, with examples comparing forEach to a for loop.
Learn how the map operator in Dart transforms each item in a collection and returns a new collection. A lambda such as value times two doubles items with minimal code.
Understand how the map method returns a lazy iterable and how to convert it to a list with toList(), clarifying the relationship between iterable, list, and set in Dart.
Master anonymous functions and generics in Dart to create type-safe, reusable code. Transform lists with flexible item functions and understand how generics compare to map for cross-type outputs.
Filter and find items in a collection using where and firstWhere, apply a predicate to extract even numbers from a list, and use orElse to handle missing matches.
Implement a generic where function in Dart to filter a list by a boolean predicate, then apply it to [1, 2, 3, 4] to extract odds, with null safety considerations.
Implement a generic firstWhere in Dart that searches a list with a predicate and an orElse fallback, using null safety, returning -1 when no match in [1, 2, 3, 4].
Discover how the reduce method uses a function with value and element to combine list items into a single value, summing 1, 2, 3, and 4 without a for loop.
Explore how to combine map, where, reduce and other functional operators in Dart to extract unknown domains from emails, and compare functional and imperative styles.
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:
Introduction
Dart Basics
Dart Type System
Control Flow
Project: Build a Command Line App
Collections
Project: Data Processing in Dart
Null Safety
Functions: Basics
Functions: Advanced
Classes: Basics
Classes: Advanced
Project: Simple eCommerce
Mixins and Extensions
Error Handling & Exceptions
Asynchronous programming
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.