diff --git a/src/_guides/language/language-tour.md b/src/_guides/language/language-tour.md index adf284af25..19f6049cef 100644 --- a/src/_guides/language/language-tour.md +++ b/src/_guides/language/language-tour.md @@ -3,463 +3,471 @@ title: A tour of the Dart language description: A tour of all the major Dart language features. short-title: Language tour js: [{url: 'https://dartpad.dev/inject_embed.dart.js', defer: true}] +sitemap: false --- - - - ## A basic Dart program - +This content has moved to [Introduction to the Dart language](/language/basics). ## Important concepts - +This content has moved to [Introduction to the Dart language](/language/basics). ## Keywords - +This content has moved to [Keywords](/language/keywords). ## Variables - +This content has moved to [Variables](/language/variables). ### Default value - +This content has moved to [Variables](/language/variables#default-value). ### Late variables - +This content has moved to [Variables](/language/variables#late-variables). ### Final and const - +This content has moved to [Variables](/language/variables#final-and-const). ## Built-in types - +This content has moved to [Built-in types](/language/built-in-types). ### Numbers - +This content has moved to [Built-in types](/language/built-in-types#numbers). ### Strings +This content has moved to [Built-in types](/language/built-in-types#strings). ### Booleans - +This content has moved to [Built-in types](/language/built-in-types#booleans). ### Lists +This content has moved to [Collection types](/language/collection-types#lists). ### Sets - +This content has moved to [Collection types](/language/collection-types#sets). ### Maps +This content has moved to [Collection types](/language/collection-types#maps). ### Runes and grapheme clusters - +This content has moved to [Built-in types](/language/built-in-types#runes-and-grapheme-clusters). ### Symbols - +This content has moved to [Built-in types](/language/built-in-types#symbols). ## Functions - +This content has moved to [Functions](/language/functions). ### Parameters - +This content has moved to [Functions](/language/functions#parameters). #### Named parameters - +This content has moved to [Functions](/language/functions#named-parameters). #### Optional positional parameters +This content has moved to [Functions](/language/functions#optional-positional-parameters). ### The main() function - +This content has moved to [Functions](/language/functions#the-main-function). ### Functions as first-class objects - +This content has moved to [Functions](/language/functions#functions-as-first-class-objects). ### Anonymous functions +This content has moved to [Functions](/language/functions#anonymous-functions). ### Lexical scope - - +This content has moved to [Functions](/language/functions#lexical-scope). ### Lexical closures - +This content has moved to [Functions](/language/functions#lexical-closures). ### Testing functions for equality +This content has moved to [Functions](/language/functions#testing-functions-for-inequality). ### Return values - - +This content has moved to [Functions](/language/functions#return-values). ## Operators +This content has moved to [Operators](/language/operators). ### Arithmetic operators - +This content has moved to [Operators](/language/operators#arithmetic-operators). ### Equality and relational operators +This content has moved to [Operators](/language/operators#equality-and-relational-operators). ### Type test operators - +This content has moved to [Operators](/language/operators#type-test-operators). ### Assignment operators - +This content has moved to [Operators](/language/operators#assignment-operators). ### Logical operators - +This content has moved to [Operators](/language/operators#logical-operators). ### Bitwise and shift operators +This content has moved to [Operators](/language/operators#bitwise-and-shift-operators). ### Conditional expressions +This content has moved to [Operators](/language/operators#conditional-operators). ### Cascade notation - +This content has moved to [Operators](/language/operators#cascade-notation). ### Other operators - - +This content has moved to [Operators](/language/operators#other-operators). ## Control flow statements - - +This content has moved to [Control flow](/language/control-flow). ### If and else - +This content has moved to [Control flow](/language/control-flow#if-and-else). ### For loops - +This content has moved to [Control flow](/language/control-flow#for-loops). ### While and do-while +This content has moved to [Control flow](/language/control-flow#while-and-do-while). ### Break and continue - +This content has moved to [Control flow](/language/control-flow#break-and-continue). ### Switch and case - +This content has moved to [Control flow](/language/control-flow#switch-and-case). ### Assert +This content has moved to [Control flow](/language/control-flow#assert). ## Exceptions - +This content has moved to [Error handling](/language/error-handling#exceptions). ### Throw - +This content has moved to [Error handling](/language/error-handling#throw). ### Catch - +This content has moved to [Error handling](/language/error-handling#catch). ### Finally - +This content has moved to [Error handling](/language/error-handling#finally). ## Classes - +This content has moved to [Classes](/language/classes). ### Using class members - +This content has moved to [Classes](/language/classes#using-class-members). ### Using constructors - +This content has moved to [Classes](/language/classes#using-constructors). ### Getting an object's type - - +This content has moved to [Classes](/language/classes#getting-an-objects-type). ### Instance variables +This content has moved to [Classes](/language/classes#instance-variables). ### Constructors - +This content has moved to [Constructors](/language/constructors). #### Initializing formal parameters - - +This content has moved to [Constructors](/language/constructors#initializing-formal-parameters). #### Default constructors - +This content has moved to [Constructors](/language/constructors#default-constructors). #### Constructors aren’t inherited +This content has moved to [Constructors](/language/constructors#constructors-arent-inherited). #### Named constructors +This content has moved to [Constructors](/language/constructors#named-constructors). #### Invoking a non-default superclass constructor - +This content has moved to [Constructors](/language/constructors#invoking-a-non-default-superclass-constructor). +### Super parameters - +This content has moved to [Constructors](/language/constructors#super-parameters). #### Initializer list - +This content has moved to [Constructors](/language/constructors#initializer-list). #### Redirecting constructors - +This content has moved to [Constructors](/language/constructors#redirecting-constructors). #### Constant constructors - +This content has moved to [Constructors](/language/constructors#constant-constructors). #### Factory constructors - - +This content has moved to [Constructors](/language/constructors#factory-constructors). ### Methods - +This content has moved to [Methods](/language/methods). #### Instance methods - +This content has moved to [Methods](/language/methods#instance-methods). #### Operators {#_operators} - +This content has moved to [Methods](/language/methods#operators). #### Getters and setters - +This content has moved to [Methods](/language/methods#getters-and-setters). #### Abstract methods - - +This content has moved to [Methods](/language/methods#abstract-methods). ### Abstract classes +This content has moved to [Classes](/language/classes#abstract-classes). ### Implicit interfaces - +This content has moved to [Classes](/language/classes#implicit-interfaces). ### Extending a class - +This content has moved to [Extend a class](/language/extend). #### Overriding members - +This content has moved to [Extend a class](/language/extend#overriding-members). #### noSuchMethod() - +This content has moved to [Extend a class](/language/extend#nosuchmethod). ### Extension methods +This content has moved to [Extension methods](/language/extension-methods). + ### Enumerated types +This content has moved to [Enumerated types](/language/enum). #### Declaring simple enums - +This content has moved to [Enumerated types](/language/enum#declaring-simple-enums). #### Declaring enhanced enums +This content has moved to [Enumerated types](/language/enum#declaring-enhanced-enums). #### Using enums - +This content has moved to [Enumerated types](/language/enum#using-enums). ### Adding features to a class: mixins +This content has moved to [Mixins](/language/mixins). ### Class variables and methods +This content has moved to [Classes](/language/classes#class-variables-and-methods). #### Static variables +This content has moved to [Classes](/language/classes#static-variables). #### Static methods - +This content has moved to [Classes](/language/classes#static-methods). ## Generics - +This content has moved to [Generics](/language/generics). ### Why use generics? +This content has moved to [Generics](/language/generics#why-use-generics). ### Using collection literals - - +This content has moved to [Generics](/language/generics#using-collection-literals). ### Using parameterized types with constructors - +This content has moved to [Generics](/language/generics#using-parameterized-types-with-constructors). ### Generic collections and the types they contain - - +This content has moved to [Generics](/language/generics#generic-collections-and-the-types-they-contain). ### Restricting the parameterized type - - +This content has moved to [Generics](/language/generics#restricting-the-parameterized-type). ### Using generic methods - - +This content has moved to [Generics](/language/generics#using-generic-methods). ## Libraries and visibility - +This content has moved to [Libraries & visibility](/guides/libraries/visibility). ### Using libraries - +This content has moved to [Libraries & visibility](/guides/libraries/visibility#using-libraries). #### Specifying a library prefix - +This content has moved to [Libraries & visibility](/guides/libraries/visibility#specifying-a-library-prefix). #### Importing only part of a library - +This content has moved to [Libraries & visibility](/guides/libraries/visibility#importing-only-part-of-a-library). #### Lazily loading a library +This content has moved to [Libraries & visibility](/guides/libraries/visibility#lazily-loading-a-library). #### The `library` directive {#library-directive} +This content has moved to [Libraries & visibility](/guides/libraries/visibility#the-library-directive). ### Implementing libraries - +This content has moved to [Libraries & visibility](/guides/libraries/visibility#implementing-libraries). ## Asynchrony support - +This content has moved to [Asynchrony support](/language/async). ### Handling Futures - +This content has moved to [Asynchrony support](/language/async#handling-futures). ### Declaring async functions - +This content has moved to [Asynchrony support](/language/async#declaring-async-functions). ### Handling Streams - +This content has moved to [Asynchrony support](/language/async#handling-streams). ## Generators - +This content has moved to [Generators](/language/generators). ## Callable classes - +This content has moved to [Callable classes](/language/callable-classes). ## Isolates - +This content has moved to [Isolates](/language/concurrency). ## Typedefs - +This content has moved to [Typedefs](/language/typedefs). ## Metadata - +This content has moved to [Metadata](/language/metadata). ## Comments - +This content has moved to [Comments](/language/comments). ### Single-line comments - +This content has moved to [Comments](/language/comments#single-line-comments). ### Multi-line comments - +This content has moved to [Comments](/language/comments#multi-line-comments). ### Documentation comments - - - -## Summary - - +This content has moved to [Comments](/language/comments#documentation-comments). diff --git a/src/language/async.md b/src/language/async.md index cb04bb318d..d6c33ae743 100644 --- a/src/language/async.md +++ b/src/language/async.md @@ -3,6 +3,8 @@ title: Asychrony support description: Information on writing asynchronous code in Dart. --- + + Dart libraries are full of functions that return [`Future`][] or [`Stream`][] objects. These functions are _asynchronous_: diff --git a/src/language/classes.md b/src/language/classes.md index 1196d5024e..befc3b5b3b 100644 --- a/src/language/classes.md +++ b/src/language/classes.md @@ -3,6 +3,8 @@ title: Classes description: Summary of classes, class instances, and their members. --- + + Dart is an object-oriented language with classes and mixin-based inheritance. Every object is an instance of a class, and all classes except `Null` descend from [`Object`][]. diff --git a/src/language/constructors.md b/src/language/constructors.md index 6374b6c14e..03d391035c 100644 --- a/src/language/constructors.md +++ b/src/language/constructors.md @@ -3,6 +3,8 @@ title: Constructors description: Everything about using constructors in Dart. --- + + Declare a constructor by creating a function with the same name as its class (plus, optionally, an additional identifier as described in [Named constructors](#named-constructors)). diff --git a/src/language/generics.md b/src/language/generics.md index 32d1bcc5c6..5ded6d4d50 100644 --- a/src/language/generics.md +++ b/src/language/generics.md @@ -3,6 +3,8 @@ title: Generics description: Learn about generic types in Dart. --- + + If you look at the API documentation for the basic array type, [`List`][], you’ll see that the type is actually `List`. The \<...\> notation marks List as a diff --git a/src/language/mixins.md b/src/language/mixins.md index c4ee89cc56..c924bbda70 100644 --- a/src/language/mixins.md +++ b/src/language/mixins.md @@ -3,6 +3,8 @@ title: Mixins description: Learn how to add to features to a class in Dart. --- + + Mixins are a way of reusing a class's code in multiple class hierarchies. diff --git a/src/language/operators.md b/src/language/operators.md index 33681edc60..24f865b4fb 100644 --- a/src/language/operators.md +++ b/src/language/operators.md @@ -3,6 +3,8 @@ title: Operators description: Learn about the operators Dart supports. --- + + Dart supports the operators shown in the following table. diff --git a/src/language/typedefs.md b/src/language/typedefs.md index efb0234ac6..1bbcf5cdc8 100644 --- a/src/language/typedefs.md +++ b/src/language/typedefs.md @@ -3,6 +3,8 @@ title: Typedefs description: Learn about type aliases in Dart. --- + + A type alias—often called a _typedef_ because it's declared with the keyword `typedef`—is a concise way to refer to a type. diff --git a/src/language/variables.md b/src/language/variables.md index 333dda6500..e913b8c09c 100644 --- a/src/language/variables.md +++ b/src/language/variables.md @@ -3,6 +3,8 @@ title: Variables description: Learn about variables in Dart. --- + + Here’s an example of creating a variable and initializing it: