A tour of the Dart language
- A basic Dart program
- Important concepts
- Keywords
- Variables
- Built-in types
- Functions
- Operators
- Control flow statements
- Exceptions
- Classes
- Generics
- Libraries and visibility
- Asynchrony support
- Generators
- Callable classes
- Isolates
- Typedefs
- Metadata
- Comments
A basic Dart program
#This content has moved to Introduction to the Dart language.
Important concepts
#This content has moved to Introduction to the Dart language.
Keywords
#This content has moved to Keywords.
Variables
#This content has moved to Variables.
Default value
#This content has moved to Variables.
Late variables
#This content has moved to Variables.
Final and const
#This content has moved to Variables.
Built-in types
#This content has moved to Built-in types.
Numbers
#This content has moved to Built-in types.
Strings
#This content has moved to Built-in types.
Booleans
#This content has moved to Built-in types.
Lists
#This content has moved to Collections.
Trailing commas
#This content has moved to Collections.
Spread operator
#This content has moved to Collections.
Collection operators
#This content has moves to Collections.
Sets
#This content has moved to Collections.
Maps
#This content has moved to Collections.
Runes and grapheme clusters
#This content has moved to Built-in types.
Symbols
#This content has moved to Built-in types.
Functions
#This content has moved to Functions.
Parameters
#This content has moved to Functions.
Named parameters
#This content has moved to Functions.
Default parameters
#This content has moved to Functions.
Optional positional parameters
#This content has moved to Functions.
The main() function
#This content has moved to Functions.
Functions as first-class objects
#This content has moved to Functions.
Anonymous functions
#This content has moved to Functions.
Lexical scope
#This content has moved to Functions.
Lexical closures
#This content has moved to Functions.
Testing functions for equality
#This content has moved to Functions.
Return values
#This content has moved to Functions.
Operators
#This content has moved to Operators.
Arithmetic operators
#This content has moved to Operators.
Equality and relational operators
#This content has moved to Operators.
Type test operators
#This content has moved to Operators.
Assignment operators
#This content has moved to Operators.
Logical operators
#This content has moved to Operators.
Bitwise and shift operators
#This content has moved to Operators.
Conditional expressions
#This content has moved to Operators.
Cascade notation
#This content has moved to Operators.
Other operators
#This content has moved to Operators.
Control flow statements
#This content has moved to Control flow.
If and else
#This content has moved to Control flow.
For loops
#This content has moved to Control flow.
While and do-while
#This content has moved to Control flow.
Break and continue
#This content has moved to Control flow.
Switch and case
#This content has moved to Control flow.
Assert
#This content has moved to Control flow.
Exceptions
#This content has moved to Error handling.
Throw
#This content has moved to Error handling.
Catch
#This content has moved to Error handling.
Finally
#This content has moved to Error handling.
Classes
#This content has moved to Classes.
Using class members
#This content has moved to Classes.
Using constructors
#This content has moved to Classes.
Getting an object's type
#This content has moved to Classes.
Instance variables
#This content has moved to Classes.
Constructors
#This content has moved to Constructors.
Initializing formal parameters
#This content has moved to Constructors.
Default constructors
#This content has moved to Constructors.
Constructors aren't inherited
#This content has moved to Constructors.
Named constructors
#This content has moved to Constructors.
Invoking a non-default superclass constructor
#This content has moved to Constructors.
Super parameters
#This content has moved to Constructors.
Initializer list
#This content has moved to Constructors.
Redirecting constructors
#This content has moved to Constructors.
Constant constructors
#This content has moved to Constructors.
Factory constructors
#This content has moved to Constructors.
Methods
#This content has moved to Methods.
Instance methods
#This content has moved to Methods.
Operators
#This content has moved to Methods.
Getters and setters
#This content has moved to Methods.
Abstract methods
#This content has moved to Methods.
Abstract classes
#This content has moved to Classes.
Implicit interfaces
#This content has moved to Classes.
Extending a class
#This content has moved to Extend a class.
Overriding members
#This content has moved to Extend a class.
noSuchMethod()
#This content has moved to Extend a class.
Extension methods
#This content has moved to Extension methods.
Enumerated types
#This content has moved to Enumerated types.
Declaring simple enums
#This content has moved to Enumerated types.
Declaring enhanced enums
#This content has moved to Enumerated types.
Using enums
#This content has moved to Enumerated types.
Adding features to a class: mixins
#This content has moved to Mixins.
Class variables and methods
#This content has moved to Classes.
Static variables
#This content has moved to Classes.
Static methods
#This content has moved to Classes.
Generics
#This content has moved to Generics.
Why use generics?
#This content has moved to Generics.
Using collection literals
#This content has moved to Generics.
Using parameterized types with constructors
#This content has moved to Generics.
Generic collections and the types they contain
#This content has moved to Generics.
Restricting the parameterized type
#This content has moved to Generics.
Using generic methods
#This content has moved to Generics.
Libraries and visibility
#This content has moved to Libraries & visibility.
Using libraries
#This content has moved to Libraries & visibility.
Specifying a library prefix
#This content has moved to Libraries & visibility.
Importing only part of a library
#This content has moved to Libraries & visibility.
Lazily loading a library
#This content has moved to Libraries & visibility.
The library
directive
#This content has moved to Libraries & visibility.
Implementing libraries
#This content has moved to Libraries & visibility.
Asynchrony support
#This content has moved to Asynchrony support.
Handling Futures
#This content has moved to Asynchrony support.
Declaring async functions
#This content has moved to Asynchrony support.
Handling Streams
#This content has moved to Asynchrony support.
Generators
#This content has moved to Generators.
Callable classes
#This content has moved to Callable objects.
Isolates
#This content has moved to Isolates.
Typedefs
#This content has moved to Typedefs.
Metadata
#This content has moved to Metadata.
Comments
#This content has moved to Comments.
Single-line comments
#This content has moved to Comments.
Multi-line comments
#This content has moved to Comments.
Documentation comments
#This content has moved to Comments.
Unless stated otherwise, the documentation on this site reflects Dart 3.5.3. Page last updated on 2024-07-03. View source or report an issue.