diff --git a/firebase.json b/firebase.json index f796a1eff3..58b42f2087 100644 --- a/firebase.json +++ b/firebase.json @@ -37,7 +37,7 @@ { "source": "/articles/await-async", "destination": "/codelabs/async-await", "type": 301 }, { "source": "/articles/broadcast-streams", "destination": "https://medium.com/dartlang/dart-asynchronous-programming-streams-dab952023ed7", "type": 301 }, { "source": "/articles/converters-and-codecs", "destination": "/articles/archive/converters-and-codecs", "type": 301 }, - { "source": "/articles/creating-streams", "destination": "/articles/libraries/creating-streams", "type": 301 }, + { "source": "/articles/creating-streams", "destination": "/libraries/async/creating-streams", "type": 301 }, { "source": "/articles/dart-unit-tests{,/**}", "destination": "https://pub.dev/packages/test#writing-tests", "type": 301 }, { "source": "/articles/dart-vm/io", "destination": "/articles/libraries/dart-io", "type": 301 }, { "source": "/articles/dart-vm/native-extensions", "destination": "/server/c-interop-native-extensions", "type": 301 }, @@ -46,8 +46,8 @@ { "source": "/articles/design-decisions/why-dart-types", "destination": "/resources/faq#types", "type": 301 }, { "source": "/articles/doc-comment-guidelines", "destination": "/effective-dart/documentation", "type": 301 }, { "source": "/articles/event-loop", "destination": "https://medium.com/dartlang/dart-asynchronous-programming-isolates-and-event-loops-bffc3e296a6a", "type": 301 }, - { "source": "/articles/feet-wet-streams{,/**}", "destination": "/tutorials/language/streams", "type": 301 }, - { "source": "/articles/futures-and-error-handling", "destination": "/guides/libraries/futures-error-handling", "type": 301 }, + { "source": "/articles/feet-wet-streams{,/**}", "destination": "/libraries/async/using-streams", "type": 301 }, + { "source": "/articles/futures-and-error-handling", "destination": "/libraries/async/futures-error-handling", "type": 301 }, { "source": "/articles/idiomatic-dart{,/**}", "destination": "/effective-dart", "type": 301 }, { "source": "/articles/io", "destination": "/articles/libraries/dart-io", "type": 301 }, { "source": "/articles/js-dart-interop", "destination": "/web/libraries#js-interop", "type": 301 }, @@ -58,8 +58,10 @@ { "source": "/articles/language/optional-types", "destination": "/resources/faq#types", "type": 301 }, { "source": "/articles/libraries", "destination": "/libraries", "type": 301 }, { "source": "/articles/libraries/converters-and-codecs", "destination": "/articles/archive/converters-and-codecs", "type": 301 }, + { "source": "/articles/libraries/creating-streams", "destination": "/libraries/async/creating-streams", "type": 301 }, { "source": "/articles/libraries/dart-io", "destination": "/libraries/dart-io", "type": 301 }, { "source": "/articles/libraries/zones", "destination": "/articles/archive/zones", "type": 301 }, + { "source": "/articles/libraries*{,/**}", "destination": "/libraries", "type": 301 }, { "source": "/articles/m*{,/**}", "destination": "/guides/language/evolution", "type": 301 }, { "source": "/articles/mixins", "destination": "/language/mixins", "type": 301 }, { "source": "/articles/mocking-with-dart", "destination": "https://pub.dev/packages/mockito", "type": 301 }, @@ -132,7 +134,7 @@ { "source": "/docs/tutorials/indexeddb{,/**}", "destination": "https://api.dart.dev/stable/dart-indexed_db/dart-indexed_db-library.html", "type": 301 }, { "source": "/docs/tutorials/remove-elements", "destination": "/library/dart-html", "type": 301 }, { "source": "/docs/tutorials/shared-pkgs", "destination": "/guides/packages", "type": 301 }, - { "source": "/docs/tutorials/streams", "destination": "/tutorials/language/streams", "type": 301 }, + { "source": "/docs/tutorials/streams", "destination": "/libraries/async/using-streams", "type": 301 }, { "source": "/docs/tutorials{,/**}", "destination": "/tutorials", "type": 301 }, { "source": "/docs{,/**}", "destination": "/guides", "type": 301 }, { "source": "/downloads{,.html,/**}", "destination": "/get-dart", "type": 301 }, @@ -207,6 +209,7 @@ { "source": "/guides/language/type-system", "destination": "/language/type-system", "type": 301 }, { "source": "/guides/libraries", "destination": "/libraries", "type": 301 }, { "source": "/guides/libraries/create-library-packages", "destination": "/guides/libraries/create-packages", "type": 301 }, + { "source": "/guides/libraries/futures-error-handling", "destination": "/libraries/async/futures-error-handling", "type": 301 }, { "source": "/guides/libraries/java-interop", "destination": "/interop/java-interop", "type": 301 }, { "source": "/guides/libraries/objective-c-interop", "destination": "/interop/objective-c-interop", "type": 301 }, { "source": "/guides/libraries/c-interop", "destination": "/interop/c-interop", "type": 301 }, @@ -295,7 +298,9 @@ { "source": "/tos@(|.htm|.html)", "destination": "/terms", "type": 301 }, { "source": "/tutorials/dart-vm", "destination": "/tutorials/server", "type": 301 }, { "source": "/tutorials/dart-vm/:page*", "destination": "/tutorials/server/:page*", "type": 301 }, + { "source": "/tutorials/language", "destination": "/language", "type": 301 }, { "source": "/tutorials/language/futures", "destination": "/codelabs/async-await", "type": 301 }, + { "source": "/tutorials/language/streams", "destination": "/libraries/async/using-streams", "type": 301 }, { "source": "/tutorials/libraries", "destination": "/libraries", "type": 301 }, { "source": "/tutorials/libraries/shared-pkgs", "destination": "/guides/packages", "type": 301 }, { "source": "/tutorials/web", "destination": "/web/get-started", "type": 301 }, diff --git a/src/_data/side-nav.yml b/src/_data/side-nav.yml index 93beff0eee..c5141adfff 100644 --- a/src/_data/side-nav.yml +++ b/src/_data/side-nav.yml @@ -139,11 +139,11 @@ permalink: /libraries/dart-html - divider - title: Using streams - permalink: /tutorials/language/streams + permalink: /libraries/async/using-streams - title: Creating streams - permalink: /articles/libraries/creating-streams + permalink: /libraries/async/creating-streams - title: Futures and error handling - permalink: /guides/libraries/futures-error-handling + permalink: /libraries/async/futures-error-handling - title: Effective Dart expanded: false diff --git a/src/content/articles/archive/zones.md b/src/content/articles/archive/zones.md index e494b1fcc1..3bbb07b369 100644 --- a/src/content/articles/archive/zones.md +++ b/src/content/articles/archive/zones.md @@ -27,7 +27,7 @@ This article discusses zone-related APIs in the [dart:async][] library, with a focus on the top-level [`runZoned()`][] and [`runZonedGuarded()`][] functions. Review the techniques covered in -[Futures and Error Handling](/guides/libraries/futures-error-handling) +[Futures and Error Handling](/libraries/async/futures-error-handling) before reading this article. [dart:async]: ({{site.dart-api}}/{{site.sdkInfo.channel}}/dart-async/dart-async-library.html) diff --git a/src/content/guides/language/coming-from/swift-to-dart.md b/src/content/guides/language/coming-from/swift-to-dart.md index 491d13104a..bb3a6a508f 100644 --- a/src/content/guides/language/coming-from/swift-to-dart.md +++ b/src/content/guides/language/coming-from/swift-to-dart.md @@ -2689,7 +2689,7 @@ You can also create a stream using the `StreamController` API. For more information, see [Using a StreamController][]. -[Using a StreamController]: /articles/libraries/creating-streams#using-a-streamcontroller +[Using a StreamController]: /libraries/async/creating-streams#using-a-streamcontroller ## Doc comments diff --git a/src/content/articles/libraries/creating-streams.md b/src/content/libraries/async/creating-streams.md similarity index 99% rename from src/content/articles/libraries/creating-streams.md rename to src/content/libraries/async/creating-streams.md index f5482a1255..c7cedc4b43 100644 --- a/src/content/articles/libraries/creating-streams.md +++ b/src/content/libraries/async/creating-streams.md @@ -36,7 +36,7 @@ This article shows the code for each approach and gives tips to help you implement your stream correctly. For help on using streams, see -[Asynchronous Programming: Streams](/tutorials/language/streams). +[Asynchronous Programming: Streams](/libraries/async/using-streams). ## Transforming an existing stream diff --git a/src/content/guides/libraries/futures-error-handling.md b/src/content/libraries/async/futures-error-handling.md similarity index 100% rename from src/content/guides/libraries/futures-error-handling.md rename to src/content/libraries/async/futures-error-handling.md diff --git a/src/content/tutorials/language/streams.md b/src/content/libraries/async/using-streams.md similarity index 98% rename from src/content/tutorials/language/streams.md rename to src/content/libraries/async/using-streams.md index 00247930eb..b9381f9132 100644 --- a/src/content/tutorials/language/streams.md +++ b/src/content/libraries/async/using-streams.md @@ -391,9 +391,9 @@ error event, and when the stream is closed. Read the following documentation for more details on using streams and asynchronous programming in Dart. -* [Creating Streams in Dart](/articles/libraries/creating-streams), +* [Creating Streams in Dart](/libraries/async/creating-streams), an article about creating your own streams -* [Futures and Error Handling](/guides/libraries/futures-error-handling), +* [Futures and Error Handling](/libraries/async/futures-error-handling), an article that explains how to handle errors using the Future API * [Asynchrony support](/language/async), a section in the [language tour](/language) diff --git a/src/content/libraries/dart-async.md b/src/content/libraries/dart-async.md index 9b20e8e625..f0463b72a1 100644 --- a/src/content/libraries/dart-async.md +++ b/src/content/libraries/dart-async.md @@ -456,9 +456,9 @@ check out the [dart:io documentation][]. Also see these articles, codelabs, and tutorials: - [Asynchronous programming: futures, async, await](/codelabs/async-await) -- [Futures and error handling](/guides/libraries/futures-error-handling) +- [Futures and error handling](/libraries/async/futures-error-handling) - [Asynchronous programming: streams](/tutorials/language/streams) -- [Creating streams in Dart](/articles/libraries/creating-streams) +- [Creating streams in Dart](/libraries/async/creating-streams) - [Dart asynchronous programming: Isolates and event loops](/language/concurrency) diff --git a/src/content/tutorials/index.md b/src/content/tutorials/index.md index 614b3b4db2..0f90d72d85 100644 --- a/src/content/tutorials/index.md +++ b/src/content/tutorials/index.md @@ -22,7 +22,7 @@ which are fundamental to most Dart programs.
-

Asynchronous programming: +

Asynchronous programming: streams

Use streams to manage sequences of data.

diff --git a/src/content/tutorials/language/index.md b/src/content/tutorials/language/index.md deleted file mode 100644 index db0d417815..0000000000 --- a/src/content/tutorials/language/index.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Dart tutorials: The language" -description: Tutorials pertaining to the Dart language, such as asynchronous programming. -toc: false ---- - -The Future and Stream classes provide API for performing tasks, -such as input/output, asynchronously, so as to avoid blocking your -program. Futures and streams are fundamental to most Dart programs. - -- The futures tutorial has been replaced by a codelab: - [Asynchronous programming: futures, async, await](/codelabs/async-await). -- The [streams tutorial](/tutorials/language/streams) - tells you how to use streams to manage sequences of data. - -For a guided, hands-on introduction to Dart concepts, -try one of the [Dart codelabs](/codelabs).