CINXE.COM
dart:async library - Dart API
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no"> <meta name="description" content="dart:async library API docs, for the Dart programming language."> <title>dart:async library - Dart API</title> <link rel="canonical" href="https://api.dart.dev/dart-async/dart-async-library.html"> <link rel="preconnect" href="https://fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet"> <link rel="stylesheet" href="../static-assets/github.css?v1"> <link rel="stylesheet" href="../static-assets/styles.css?v1"> <link rel="icon" href="../static-assets/favicon.png?v1"> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-VVQ8908SJ5"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-VVQ8908SJ5'); </script> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preload" href="https://fonts.googleapis.com/css2?family=Google+Sans+Text:wght@400&family=Google+Sans:wght@500&display=swap" as="style"> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Google+Sans+Text:wght@400&family=Google+Sans:wght@500&display=swap"> <link rel="stylesheet" href="https://www.gstatic.com/glue/cookienotificationbar/cookienotificationbar.min.css"> </head> <body data-base-href="../" data-using-base-href="false" class="light-theme"> <div id="overlay-under-drawer"></div> <header id="title"> <span id="sidenav-left-toggle" class="material-symbols-outlined" role="button" tabindex="0">menu</span> <ol class="breadcrumbs gt-separated dark hidden-xs"> <li><a href="../index.html">Dart</a></li> <li class="self-crumb">dart:async</li> </ol> <div class="self-name">dart:async</div> <form class="search navbar-right" role="search"> <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search..."> </form> <div class="toggle" id="theme-button" title="Toggle brightness"> <label for="theme"> <input type="checkbox" id="theme" value="light-theme"> <span id="dark-theme-button" class="material-symbols-outlined"> dark_mode </span> <span id="light-theme-button" class="material-symbols-outlined"> light_mode </span> </label> </div> </header> <main> <div id="dartdoc-main-content" class="main-content" data-above-sidebar="" data-below-sidebar="dart-async/dart-async-library-sidebar.html"> <div> <div id="external-links" class="btn-group"><a title="View source code" class="source-link" href="https://github.com/dart-lang/sdk/blob/88c9758ef131d430d8ce595c6bfb4c90574d3ddd/sdk/lib/async/async.dart#L104"><span class="material-symbols-outlined">description</span></a></div> <h1> <span class="kind-library">dart:async</span> library </h1> </div> <section class="desc markdown"> <p>Support for asynchronous programming, with classes such as Future and Stream.</p> <p><a href="../dart-async/Future-class.html">Future</a>s and <a href="../dart-async/Stream-class.html">Stream</a>s are the fundamental building blocks of asynchronous programming in Dart. They are supported directly in the language through <code>async</code> and <code>async*</code> functions, and are available to all libraries through the <code>dart:core</code> library.</p> <p>This library provides further tools for creating, consuming and transforming futures and streams, as well as direct access to other asynchronous primitives like <a href="../dart-async/Timer-class.html">Timer</a>, <a href="../dart-async/scheduleMicrotask.html">scheduleMicrotask</a> and <a href="../dart-async/Zone-class.html">Zone</a>.</p> <p>To use this library in your code:</p> <pre class="language-dart"><code class="language-dart">import 'dart:async'; </code></pre> <h2 id="future">Future</h2> <p>A Future object represents a computation whose return value might not yet be available. The Future returns the value of the computation when it completes at some time in the future. Futures are often used for APIs that are implemented using a different thread or isolate (e.g., the asynchronous I/O operations of <code>dart:io</code> or HTTP requests of <code>dart:html</code>).</p> <p>Many methods in the Dart libraries return <code>Future</code>s when performing tasks. For example, when binding an <code>HttpServer</code> to a host and port, the <code>bind()</code> method returns a Future.</p> <pre class="language-dart"><code class="language-dart"> HttpServer.bind('127.0.0.1', 4444) .then((server) => print('${server.isBroadcast}')) .catchError(print); </code></pre> <p><a href="../dart-async/Future/then.html">Future.then</a> registers a callback function that runs when the Future's operation, in this case the <code>bind()</code> method, completes successfully. The value returned by the operation is passed into the callback function. In this example, the <code>bind()</code> method returns the HttpServer object. The callback function prints one of its properties. <a href="../dart-async/Future/catchError.html">Future.catchError</a> registers a callback function that runs if an error occurs within the Future.</p> <h2 id="stream">Stream</h2> <p>A Stream provides an asynchronous sequence of data. Examples of data sequences include individual events, like mouse clicks, or sequential chunks of larger data, like multiple byte lists with the contents of a file such as mouse clicks, and a stream of byte lists read from a file. The following example opens a file for reading. <a href="../dart-async/Stream/listen.html">Stream.listen</a> registers callback functions that run each time more data is available, an error has occurred, or the stream has finished. Further functionality is provided on <a href="../dart-async/Stream-class.html">Stream</a>, implemented by calling <a href="../dart-async/Stream/listen.html">Stream.listen</a> to get the actual data.</p> <pre class="language-dart"><code class="language-dart">Stream<List<int>> stream = File('quotes.txt').openRead(); stream.transform(utf8.decoder).forEach(print); </code></pre> <p>This stream emits a sequence of lists of bytes. The program must then handle those lists of bytes in some way. Here, the code uses a UTF-8 decoder (provided in the <code>dart:convert</code> library) to convert the sequence of bytes into a sequence of Dart strings.</p> <p>Another common use of streams is for user-generated events in a web app: The following code listens for mouse clicks on a button.</p> <pre class="language-dart"><code class="language-dart">querySelector('#myButton')!.onClick.forEach((_) => print('Click.')); </code></pre> <h2 id="other-resources">Other resources</h2> <ul> <li> <p>The <a href="https://dart.dev/guides/libraries/library-tour#dartasync---asynchronous-programming">dart:async section of the library tour</a>: A brief overview of asynchronous programming.</p> </li> <li> <p><a href="https://dart.dev/codelabs/async-await">Use Future-Based APIs</a>: A closer look at Futures and how to use them to write asynchronous Dart code.</p> </li> <li> <p><a href="https://dart.dev/guides/libraries/futures-error-handling">Futures and Error Handling</a>: Everything you wanted to know about handling errors and exceptions when working with Futures (but were afraid to ask).</p> </li> <li> <p><a href="https://dart.dev/articles/event-loop/">The Event Loop and Dart</a>: Learn how Dart handles the event queue and microtask queue, so you can write better asynchronous code with fewer surprises.</p> </li> <li> <p><a href="https://pub.dev/packages/test">test package: Asynchronous Tests</a>: How to test asynchronous code.</p> </li> </ul> </section> <section class="summary offset-anchor" id="classes"> <h2>Classes</h2> <dl> <dt id="Completer"> <span class="name "><a href="../dart-async/Completer-class.html">Completer</a><span class="signature"><<wbr><span class="type-parameter">T</span>></span></span> </dt> <dd> A way to produce Future objects and to complete them later with a value or error. </dd> <dt id="EventSink"> <span class="name "><a href="../dart-async/EventSink-class.html">EventSink</a><span class="signature"><<wbr><span class="type-parameter">T</span>></span></span> </dt> <dd> A <a href="../dart-core/Sink-class.html">Sink</a> that supports adding errors. </dd> <dt id="Future"> <span class="name "><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T</span>></span></span> </dt> <dd> The result of an asynchronous computation. </dd> <dt id="FutureOr"> <span class="name "><a href="../dart-async/FutureOr-class.html">FutureOr</a><span class="signature"><<wbr><span class="type-parameter">T</span>></span></span> </dt> <dd> A type representing values that are either <code>Future<T></code> or <code>T</code>. </dd> <dt id="MultiStreamController"> <span class="name "><a href="../dart-async/MultiStreamController-class.html">MultiStreamController</a><span class="signature"><<wbr><span class="type-parameter">T</span>></span></span> </dt> <dd> An enhanced stream controller provided by <a href="../dart-async/Stream/Stream.multi.html">Stream.multi</a>. </dd> <dt id="Stream"> <span class="name "><a href="../dart-async/Stream-class.html">Stream</a><span class="signature"><<wbr><span class="type-parameter">T</span>></span></span> </dt> <dd> A source of asynchronous data events. </dd> <dt id="StreamConsumer"> <span class="name "><a href="../dart-async/StreamConsumer-class.html">StreamConsumer</a><span class="signature"><<wbr><span class="type-parameter">S</span>></span></span> </dt> <dd> Abstract interface for a "sink" accepting multiple entire streams. </dd> <dt id="StreamController"> <span class="name "><a href="../dart-async/StreamController-class.html">StreamController</a><span class="signature"><<wbr><span class="type-parameter">T</span>></span></span> </dt> <dd> A controller with the stream it controls. </dd> <dt id="StreamIterator"> <span class="name "><a href="../dart-async/StreamIterator-class.html">StreamIterator</a><span class="signature"><<wbr><span class="type-parameter">T</span>></span></span> </dt> <dd> An <a href="../dart-core/Iterator-class.html">Iterator</a>-like interface for the values of a <a href="../dart-async/Stream-class.html">Stream</a>. </dd> <dt id="StreamSink"> <span class="name "><a href="../dart-async/StreamSink-class.html">StreamSink</a><span class="signature"><<wbr><span class="type-parameter">S</span>></span></span> </dt> <dd> A object that accepts stream events both synchronously and asynchronously. </dd> <dt id="StreamSubscription"> <span class="name "><a href="../dart-async/StreamSubscription-class.html">StreamSubscription</a><span class="signature"><<wbr><span class="type-parameter">T</span>></span></span> </dt> <dd> A subscription on events from a <a href="../dart-async/Stream-class.html">Stream</a>. </dd> <dt id="StreamTransformer"> <span class="name "><a href="../dart-async/StreamTransformer-class.html">StreamTransformer</a><span class="signature"><<wbr><span class="type-parameter">S</span>, <span class="type-parameter">T</span>></span></span> </dt> <dd> Transforms a Stream. </dd> <dt id="StreamTransformerBase"> <span class="name "><a href="../dart-async/StreamTransformerBase-class.html">StreamTransformerBase</a><span class="signature"><<wbr><span class="type-parameter">S</span>, <span class="type-parameter">T</span>></span></span> </dt> <dd> Base class for implementing <a href="../dart-async/StreamTransformer-class.html">StreamTransformer</a>. </dd> <dt id="StreamView"> <span class="name "><a href="../dart-async/StreamView-class.html">StreamView</a><span class="signature"><<wbr><span class="type-parameter">T</span>></span></span> </dt> <dd> <a href="../dart-async/Stream-class.html">Stream</a> wrapper that only exposes the <a href="../dart-async/Stream-class.html">Stream</a> interface. </dd> <dt id="SynchronousStreamController"> <span class="name "><a href="../dart-async/SynchronousStreamController-class.html">SynchronousStreamController</a><span class="signature"><<wbr><span class="type-parameter">T</span>></span></span> </dt> <dd> A stream controller that delivers its events synchronously. </dd> <dt id="Timer"> <span class="name "><a href="../dart-async/Timer-class.html">Timer</a></span> </dt> <dd> A countdown timer that can be configured to fire once or repeatedly. </dd> <dt id="Zone"> <span class="name "><a href="../dart-async/Zone-class.html">Zone</a></span> </dt> <dd> A zone represents an environment that remains stable across asynchronous calls. </dd> <dt id="ZoneDelegate"> <span class="name "><a href="../dart-async/ZoneDelegate-class.html">ZoneDelegate</a></span> </dt> <dd> An adapted view of the parent zone. </dd> <dt id="ZoneSpecification"> <span class="name "><a href="../dart-async/ZoneSpecification-class.html">ZoneSpecification</a></span> </dt> <dd> A parameter object with custom zone function handlers for <a href="../dart-async/Zone/fork.html">Zone.fork</a>. </dd> </dl> </section> <section class="summary offset-anchor" id="extensions"> <h2>Extensions</h2> <dl> <dt id="FutureExtensions"> <span class="name "><a href="../dart-async/FutureExtensions.html">FutureExtensions</a></span> on <a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T</span>></span> </dt> <dd> Convenience methods on futures. </dd> <dt id="FutureIterable"> <span class="name "><a href="../dart-async/FutureIterable.html">FutureIterable</a></span> on <a href="../dart-core/Iterable-class.html">Iterable</a><span class="signature"><<wbr><span class="type-parameter"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T</span>></span></span>></span> </dt> <dd> </dd> <dt id="FutureRecord2"> <span class="name "><a href="../dart-async/FutureRecord2.html">FutureRecord2</a></span> on (<span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T1</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T2</span>></span></span></span>) </dt> <dd> Parallel operations on a record of futures. </dd> <dt id="FutureRecord3"> <span class="name "><a href="../dart-async/FutureRecord3.html">FutureRecord3</a></span> on (<span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T1</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T2</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T3</span>></span></span></span>) </dt> <dd> Parallel operations on a record of futures. </dd> <dt id="FutureRecord4"> <span class="name "><a href="../dart-async/FutureRecord4.html">FutureRecord4</a></span> on (<span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T1</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T2</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T3</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T4</span>></span></span></span>) </dt> <dd> Parallel operations on a record of futures. </dd> <dt id="FutureRecord5"> <span class="name "><a href="../dart-async/FutureRecord5.html">FutureRecord5</a></span> on (<span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T1</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T2</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T3</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T4</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T5</span>></span></span></span>) </dt> <dd> Parallel operations on a record of futures. </dd> <dt id="FutureRecord6"> <span class="name "><a href="../dart-async/FutureRecord6.html">FutureRecord6</a></span> on (<span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T1</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T2</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T3</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T4</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T5</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T6</span>></span></span></span>) </dt> <dd> Parallel operations on a record of futures. </dd> <dt id="FutureRecord7"> <span class="name "><a href="../dart-async/FutureRecord7.html">FutureRecord7</a></span> on (<span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T1</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T2</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T3</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T4</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T5</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T6</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T7</span>></span></span></span>) </dt> <dd> Parallel operations on a record of futures. </dd> <dt id="FutureRecord8"> <span class="name "><a href="../dart-async/FutureRecord8.html">FutureRecord8</a></span> on (<span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T1</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T2</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T3</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T4</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T5</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T6</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T7</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T8</span>></span></span></span>) </dt> <dd> Parallel operations on a record of futures. </dd> <dt id="FutureRecord9"> <span class="name "><a href="../dart-async/FutureRecord9.html">FutureRecord9</a></span> on (<span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T1</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T2</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T3</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T4</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T5</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T6</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T7</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T8</span>></span></span>, </span><span class="field"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">T9</span>></span></span></span>) </dt> <dd> Parallel operations on a record of futures. </dd> </dl> </section> <section class="summary offset-anchor" id="functions"> <h2>Functions</h2> <dl class="callables"> <dt id="runZoned" class="callable"> <span class="name"><a href="../dart-async/runZoned.html">runZoned</a></span><span class="signature"><<wbr><span class="type-parameter">R</span>></span><span class="signature">(<wbr><span class="parameter" id="runZoned-param-body"><span class="type-annotation">R</span> <span class="parameter-name">body</span>(), {</span><span class="parameter" id="runZoned-param-zoneValues"><span class="type-annotation"><a href="../dart-core/Map-class.html">Map</a><span class="signature"><<wbr><span class="type-parameter"><a href="../dart-core/Object-class.html">Object</a>?</span>, <span class="type-parameter"><a href="../dart-core/Object-class.html">Object</a>?</span>></span>?</span> <span class="parameter-name">zoneValues</span>, </span><span class="parameter" id="runZoned-param-zoneSpecification"><span class="type-annotation"><a href="../dart-async/ZoneSpecification-class.html">ZoneSpecification</a>?</span> <span class="parameter-name">zoneSpecification</span>, </span><span class="parameter" id="runZoned-param-onError"><span class="type-annotation"><a href="../dart-core/Function-class.html">Function</a>?</span> <span class="parameter-name">onError</span></span>}) <span class="returntype parameter">→ R</span> </span> </dt> <dd> Runs <code>body</code> in its own zone. </dd> <dt id="runZonedGuarded" class="callable"> <span class="name"><a href="../dart-async/runZonedGuarded.html">runZonedGuarded</a></span><span class="signature"><<wbr><span class="type-parameter">R</span>></span><span class="signature">(<wbr><span class="parameter" id="runZonedGuarded-param-body"><span class="type-annotation">R</span> <span class="parameter-name">body</span>(), </span><span class="parameter" id="runZonedGuarded-param-onError"><span class="type-annotation">void</span> <span class="parameter-name">onError</span>(<span class="parameter" id="onError-param-error"><span class="type-annotation"><a href="../dart-core/Object-class.html">Object</a></span> <span class="parameter-name">error</span>, </span><span class="parameter" id="onError-param-stack"><span class="type-annotation"><a href="../dart-core/StackTrace-class.html">StackTrace</a></span> <span class="parameter-name">stack</span></span>), {</span><span class="parameter" id="runZonedGuarded-param-zoneValues"><span class="type-annotation"><a href="../dart-core/Map-class.html">Map</a><span class="signature"><<wbr><span class="type-parameter"><a href="../dart-core/Object-class.html">Object</a>?</span>, <span class="type-parameter"><a href="../dart-core/Object-class.html">Object</a>?</span>></span>?</span> <span class="parameter-name">zoneValues</span>, </span><span class="parameter" id="runZonedGuarded-param-zoneSpecification"><span class="type-annotation"><a href="../dart-async/ZoneSpecification-class.html">ZoneSpecification</a>?</span> <span class="parameter-name">zoneSpecification</span></span>}) <span class="returntype parameter">→ R?</span> </span> </dt> <dd> Runs <code>body</code> in its own error zone. </dd> <dt id="scheduleMicrotask" class="callable"> <span class="name"><a href="../dart-async/scheduleMicrotask.html">scheduleMicrotask</a></span><span class="signature">(<wbr><span class="parameter" id="scheduleMicrotask-param-callback"><span class="type-annotation">void</span> <span class="parameter-name">callback</span>()</span>) <span class="returntype parameter">→ void</span> </span> </dt> <dd> Runs a function asynchronously. </dd> <dt id="unawaited" class="callable"> <span class="name"><a href="../dart-async/unawaited.html">unawaited</a></span><span class="signature">(<wbr><span class="parameter" id="unawaited-param-future"><span class="type-annotation"><a href="../dart-async/Future-class.html">Future</a><span class="signature"><<wbr><span class="type-parameter">void</span>></span>?</span> <span class="parameter-name">future</span></span>) <span class="returntype parameter">→ void</span> </span> </dt> <dd> Explicitly ignores a future. </dd> </dl> </section> <section class="summary offset-anchor" id="typedefs"> <h2>Typedefs</h2> <dl> <dt id="ControllerCallback" class="callable"> <span class="name"><a href="../dart-async/ControllerCallback.html">ControllerCallback</a></span><span class="signature"> <span class="returntype parameter">= void Function<span class="signature">()</span></span> </span> </dt> <dd> Type of a stream controller's <code>onListen</code>, <code>onPause</code> and <code>onResume</code> callbacks. </dd> <dt id="ControllerCancelCallback" class="callable"> <span class="name"><a href="../dart-async/ControllerCancelCallback.html">ControllerCancelCallback</a></span><span class="signature"> <span class="returntype parameter">= <a href="../dart-async/FutureOr-class.html">FutureOr</a><span class="signature"><<wbr><span class="type-parameter">void</span>></span> Function<span class="signature">()</span></span> </span> </dt> <dd> Type of stream controller <code>onCancel</code> callbacks. </dd> <dt id="CreatePeriodicTimerHandler" class="callable"> <span class="name"><a href="../dart-async/CreatePeriodicTimerHandler.html">CreatePeriodicTimerHandler</a></span><span class="signature"> <span class="returntype parameter">= <a href="../dart-async/Timer-class.html">Timer</a> Function<span class="signature">(<span class="parameter" id="param-self"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">self</span>, </span><span class="parameter" id="param-parent"><span class="type-annotation"><a href="../dart-async/ZoneDelegate-class.html">ZoneDelegate</a></span> <span class="parameter-name">parent</span>, </span><span class="parameter" id="param-zone"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">zone</span>, </span><span class="parameter" id="param-period"><span class="type-annotation"><a href="../dart-core/Duration-class.html">Duration</a></span> <span class="parameter-name">period</span>, </span><span class="parameter" id="param-f"><span class="type-annotation">void</span> <span class="parameter-name">f</span>(<span class="parameter" id="param-timer"><span class="type-annotation"><a href="../dart-async/Timer-class.html">Timer</a></span> <span class="parameter-name">timer</span></span>)</span>)</span></span> </span> </dt> <dd> The type of a custom <a href="../dart-async/Zone/createPeriodicTimer.html">Zone.createPeriodicTimer</a> implementation function. </dd> <dt id="CreateTimerHandler" class="callable"> <span class="name"><a href="../dart-async/CreateTimerHandler.html">CreateTimerHandler</a></span><span class="signature"> <span class="returntype parameter">= <a href="../dart-async/Timer-class.html">Timer</a> Function<span class="signature">(<span class="parameter" id="param-self"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">self</span>, </span><span class="parameter" id="param-parent"><span class="type-annotation"><a href="../dart-async/ZoneDelegate-class.html">ZoneDelegate</a></span> <span class="parameter-name">parent</span>, </span><span class="parameter" id="param-zone"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">zone</span>, </span><span class="parameter" id="param-duration"><span class="type-annotation"><a href="../dart-core/Duration-class.html">Duration</a></span> <span class="parameter-name">duration</span>, </span><span class="parameter" id="param-f"><span class="type-annotation">void</span> <span class="parameter-name">f</span>()</span>)</span></span> </span> </dt> <dd> The type of a custom <a href="../dart-async/Zone/createTimer.html">Zone.createTimer</a> implementation function. </dd> <dt id="ErrorCallbackHandler" class="callable"> <span class="name"><a href="../dart-async/ErrorCallbackHandler.html">ErrorCallbackHandler</a></span><span class="signature"> <span class="returntype parameter">= <a href="../dart-async/AsyncError-class.html">AsyncError</a>? Function<span class="signature">(<span class="parameter" id="param-self"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">self</span>, </span><span class="parameter" id="param-parent"><span class="type-annotation"><a href="../dart-async/ZoneDelegate-class.html">ZoneDelegate</a></span> <span class="parameter-name">parent</span>, </span><span class="parameter" id="param-zone"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">zone</span>, </span><span class="parameter" id="param-error"><span class="type-annotation"><a href="../dart-core/Object-class.html">Object</a></span> <span class="parameter-name">error</span>, </span><span class="parameter" id="param-stackTrace"><span class="type-annotation"><a href="../dart-core/StackTrace-class.html">StackTrace</a>?</span> <span class="parameter-name">stackTrace</span></span>)</span></span> </span> </dt> <dd> The type of a custom <a href="../dart-async/Zone/errorCallback.html">Zone.errorCallback</a> implementation function. </dd> <dt id="ForkHandler" class="callable"> <span class="name"><a href="../dart-async/ForkHandler.html">ForkHandler</a></span><span class="signature"> <span class="returntype parameter">= <a href="../dart-async/Zone-class.html">Zone</a> Function<span class="signature">(<span class="parameter" id="param-self"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">self</span>, </span><span class="parameter" id="param-parent"><span class="type-annotation"><a href="../dart-async/ZoneDelegate-class.html">ZoneDelegate</a></span> <span class="parameter-name">parent</span>, </span><span class="parameter" id="param-zone"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">zone</span>, </span><span class="parameter" id="param-specification"><span class="type-annotation"><a href="../dart-async/ZoneSpecification-class.html">ZoneSpecification</a>?</span> <span class="parameter-name">specification</span>, </span><span class="parameter" id="param-zoneValues"><span class="type-annotation"><a href="../dart-core/Map-class.html">Map</a><span class="signature"><<wbr><span class="type-parameter"><a href="../dart-core/Object-class.html">Object</a>?</span>, <span class="type-parameter"><a href="../dart-core/Object-class.html">Object</a>?</span>></span>?</span> <span class="parameter-name">zoneValues</span></span>)</span></span> </span> </dt> <dd> The type of a custom <a href="../dart-async/Zone/fork.html">Zone.fork</a> implementation function. </dd> <dt id="HandleUncaughtErrorHandler" class="callable"> <span class="name"><a href="../dart-async/HandleUncaughtErrorHandler.html">HandleUncaughtErrorHandler</a></span><span class="signature"> <span class="returntype parameter">= void Function<span class="signature">(<span class="parameter" id="param-self"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">self</span>, </span><span class="parameter" id="param-parent"><span class="type-annotation"><a href="../dart-async/ZoneDelegate-class.html">ZoneDelegate</a></span> <span class="parameter-name">parent</span>, </span><span class="parameter" id="param-zone"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">zone</span>, </span><span class="parameter" id="param-error"><span class="type-annotation"><a href="../dart-core/Object-class.html">Object</a></span> <span class="parameter-name">error</span>, </span><span class="parameter" id="param-stackTrace"><span class="type-annotation"><a href="../dart-core/StackTrace-class.html">StackTrace</a></span> <span class="parameter-name">stackTrace</span></span>)</span></span> </span> </dt> <dd> The type of a custom <a href="../dart-async/Zone/handleUncaughtError.html">Zone.handleUncaughtError</a> implementation function. </dd> <dt id="PrintHandler" class="callable"> <span class="name"><a href="../dart-async/PrintHandler.html">PrintHandler</a></span><span class="signature"> <span class="returntype parameter">= void Function<span class="signature">(<span class="parameter" id="param-self"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">self</span>, </span><span class="parameter" id="param-parent"><span class="type-annotation"><a href="../dart-async/ZoneDelegate-class.html">ZoneDelegate</a></span> <span class="parameter-name">parent</span>, </span><span class="parameter" id="param-zone"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">zone</span>, </span><span class="parameter" id="param-line"><span class="type-annotation"><a href="../dart-core/String-class.html">String</a></span> <span class="parameter-name">line</span></span>)</span></span> </span> </dt> <dd> The type of a custom <a href="../dart-async/Zone/print.html">Zone.print</a> implementation function. </dd> <dt id="RegisterBinaryCallbackHandler" class="callable"> <span class="name"><a href="../dart-async/RegisterBinaryCallbackHandler.html">RegisterBinaryCallbackHandler</a></span><span class="signature"> <span class="returntype parameter">= <a href="../dart-async/ZoneBinaryCallback.html">ZoneBinaryCallback</a><span class="signature"><<wbr><span class="type-parameter">R</span>, <span class="type-parameter">T1</span>, <span class="type-parameter">T2</span>></span> Function<<wbr><span class="type-parameter">R</span>, <span class="type-parameter">T1</span>, <span class="type-parameter">T2</span>><span class="signature">(<span class="parameter" id="param-self"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">self</span>, </span><span class="parameter" id="param-parent"><span class="type-annotation"><a href="../dart-async/ZoneDelegate-class.html">ZoneDelegate</a></span> <span class="parameter-name">parent</span>, </span><span class="parameter" id="param-zone"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">zone</span>, </span><span class="parameter" id="param-f"><span class="type-annotation">R</span> <span class="parameter-name">f</span>(<span class="parameter" id="param-arg1"><span class="type-annotation">T1</span> <span class="parameter-name">arg1</span>, </span><span class="parameter" id="param-arg2"><span class="type-annotation">T2</span> <span class="parameter-name">arg2</span></span>)</span>)</span></span> </span> </dt> <dd> The type of a custom <a href="../dart-async/Zone/registerBinaryCallback.html">Zone.registerBinaryCallback</a> implementation function. </dd> <dt id="RegisterCallbackHandler" class="callable"> <span class="name"><a href="../dart-async/RegisterCallbackHandler.html">RegisterCallbackHandler</a></span><span class="signature"> <span class="returntype parameter">= <a href="../dart-async/ZoneCallback.html">ZoneCallback</a><span class="signature"><<wbr><span class="type-parameter">R</span>></span> Function<<wbr><span class="type-parameter">R</span>><span class="signature">(<span class="parameter" id="param-self"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">self</span>, </span><span class="parameter" id="param-parent"><span class="type-annotation"><a href="../dart-async/ZoneDelegate-class.html">ZoneDelegate</a></span> <span class="parameter-name">parent</span>, </span><span class="parameter" id="param-zone"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">zone</span>, </span><span class="parameter" id="param-f"><span class="type-annotation">R</span> <span class="parameter-name">f</span>()</span>)</span></span> </span> </dt> <dd> The type of a custom <a href="../dart-async/Zone/registerCallback.html">Zone.registerCallback</a> implementation function. </dd> <dt id="RegisterUnaryCallbackHandler" class="callable"> <span class="name"><a href="../dart-async/RegisterUnaryCallbackHandler.html">RegisterUnaryCallbackHandler</a></span><span class="signature"> <span class="returntype parameter">= <a href="../dart-async/ZoneUnaryCallback.html">ZoneUnaryCallback</a><span class="signature"><<wbr><span class="type-parameter">R</span>, <span class="type-parameter">T</span>></span> Function<<wbr><span class="type-parameter">R</span>, <span class="type-parameter">T</span>><span class="signature">(<span class="parameter" id="param-self"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">self</span>, </span><span class="parameter" id="param-parent"><span class="type-annotation"><a href="../dart-async/ZoneDelegate-class.html">ZoneDelegate</a></span> <span class="parameter-name">parent</span>, </span><span class="parameter" id="param-zone"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">zone</span>, </span><span class="parameter" id="param-f"><span class="type-annotation">R</span> <span class="parameter-name">f</span>(<span class="parameter" id="param-arg"><span class="type-annotation">T</span> <span class="parameter-name">arg</span></span>)</span>)</span></span> </span> </dt> <dd> The type of a custom <a href="../dart-async/Zone/registerUnaryCallback.html">Zone.registerUnaryCallback</a> implementation function. </dd> <dt id="RunBinaryHandler" class="callable"> <span class="name"><a href="../dart-async/RunBinaryHandler.html">RunBinaryHandler</a></span><span class="signature"> <span class="returntype parameter">= R Function<<wbr><span class="type-parameter">R</span>, <span class="type-parameter">T1</span>, <span class="type-parameter">T2</span>><span class="signature">(<span class="parameter" id="param-self"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">self</span>, </span><span class="parameter" id="param-parent"><span class="type-annotation"><a href="../dart-async/ZoneDelegate-class.html">ZoneDelegate</a></span> <span class="parameter-name">parent</span>, </span><span class="parameter" id="param-zone"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">zone</span>, </span><span class="parameter" id="param-f"><span class="type-annotation">R</span> <span class="parameter-name">f</span>(<span class="parameter" id="param-arg1"><span class="type-annotation">T1</span> <span class="parameter-name">arg1</span>, </span><span class="parameter" id="param-arg2"><span class="type-annotation">T2</span> <span class="parameter-name">arg2</span></span>), </span><span class="parameter" id="param-arg1"><span class="type-annotation">T1</span> <span class="parameter-name">arg1</span>, </span><span class="parameter" id="param-arg2"><span class="type-annotation">T2</span> <span class="parameter-name">arg2</span></span>)</span></span> </span> </dt> <dd> The type of a custom <a href="../dart-async/Zone/runBinary.html">Zone.runBinary</a> implementation function. </dd> <dt id="RunHandler" class="callable"> <span class="name"><a href="../dart-async/RunHandler.html">RunHandler</a></span><span class="signature"> <span class="returntype parameter">= R Function<<wbr><span class="type-parameter">R</span>><span class="signature">(<span class="parameter" id="param-self"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">self</span>, </span><span class="parameter" id="param-parent"><span class="type-annotation"><a href="../dart-async/ZoneDelegate-class.html">ZoneDelegate</a></span> <span class="parameter-name">parent</span>, </span><span class="parameter" id="param-zone"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">zone</span>, </span><span class="parameter" id="param-f"><span class="type-annotation">R</span> <span class="parameter-name">f</span>()</span>)</span></span> </span> </dt> <dd> The type of a custom <a href="../dart-async/Zone/run.html">Zone.run</a> implementation function. </dd> <dt id="RunUnaryHandler" class="callable"> <span class="name"><a href="../dart-async/RunUnaryHandler.html">RunUnaryHandler</a></span><span class="signature"> <span class="returntype parameter">= R Function<<wbr><span class="type-parameter">R</span>, <span class="type-parameter">T</span>><span class="signature">(<span class="parameter" id="param-self"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">self</span>, </span><span class="parameter" id="param-parent"><span class="type-annotation"><a href="../dart-async/ZoneDelegate-class.html">ZoneDelegate</a></span> <span class="parameter-name">parent</span>, </span><span class="parameter" id="param-zone"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">zone</span>, </span><span class="parameter" id="param-f"><span class="type-annotation">R</span> <span class="parameter-name">f</span>(<span class="parameter" id="param-arg"><span class="type-annotation">T</span> <span class="parameter-name">arg</span></span>), </span><span class="parameter" id="param-arg"><span class="type-annotation">T</span> <span class="parameter-name">arg</span></span>)</span></span> </span> </dt> <dd> The type of a custom <a href="../dart-async/Zone/runUnary.html">Zone.runUnary</a> implementation function. </dd> <dt id="ScheduleMicrotaskHandler" class="callable"> <span class="name"><a href="../dart-async/ScheduleMicrotaskHandler.html">ScheduleMicrotaskHandler</a></span><span class="signature"> <span class="returntype parameter">= void Function<span class="signature">(<span class="parameter" id="param-self"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">self</span>, </span><span class="parameter" id="param-parent"><span class="type-annotation"><a href="../dart-async/ZoneDelegate-class.html">ZoneDelegate</a></span> <span class="parameter-name">parent</span>, </span><span class="parameter" id="param-zone"><span class="type-annotation"><a href="../dart-async/Zone-class.html">Zone</a></span> <span class="parameter-name">zone</span>, </span><span class="parameter" id="param-f"><span class="type-annotation">void</span> <span class="parameter-name">f</span>()</span>)</span></span> </span> </dt> <dd> The type of a custom <a href="../dart-async/Zone/scheduleMicrotask.html">Zone.scheduleMicrotask</a> implementation function. </dd> <dt id="ZoneBinaryCallback" class="callable"> <span class="name"><a href="../dart-async/ZoneBinaryCallback.html">ZoneBinaryCallback</a></span><<wbr><span class="type-parameter">R</span>, <span class="type-parameter">T1</span>, <span class="type-parameter">T2</span>><span class="signature"> <span class="returntype parameter">= R Function<span class="signature">(<span class="parameter" id="param-"><span class="type-annotation">T1</span>, </span><span class="parameter" id="param-"><span class="type-annotation">T2</span></span>)</span></span> </span> </dt> <dd> </dd> <dt id="ZoneCallback" class="callable"> <span class="name"><a href="../dart-async/ZoneCallback.html">ZoneCallback</a></span><<wbr><span class="type-parameter">R</span>><span class="signature"> <span class="returntype parameter">= R Function<span class="signature">()</span></span> </span> </dt> <dd> </dd> <dt id="ZoneUnaryCallback" class="callable"> <span class="name"><a href="../dart-async/ZoneUnaryCallback.html">ZoneUnaryCallback</a></span><<wbr><span class="type-parameter">R</span>, <span class="type-parameter">T</span>><span class="signature"> <span class="returntype parameter">= R Function<span class="signature">(<span class="parameter" id="param-"><span class="type-annotation">T</span></span>)</span></span> </span> </dt> <dd> </dd> </dl> </section> <section class="summary offset-anchor" id="exceptions"> <h2>Exceptions / Errors</h2> <dl> <dt id="AsyncError"> <span class="name "><a href="../dart-async/AsyncError-class.html">AsyncError</a></span> </dt> <dd> An error and a stack trace. </dd> <dt id="DeferredLoadException"> <span class="name "><a href="../dart-async/DeferredLoadException-class.html">DeferredLoadException</a></span> </dt> <dd> Thrown when a deferred library fails to load. </dd> <dt id="ParallelWaitError"> <span class="name "><a href="../dart-async/ParallelWaitError-class.html">ParallelWaitError</a><span class="signature"><<wbr><span class="type-parameter">V</span>, <span class="type-parameter">E</span>></span></span> </dt> <dd> Error thrown when waiting for multiple futures, when some have errors. </dd> <dt id="TimeoutException"> <span class="name "><a href="../dart-async/TimeoutException-class.html">TimeoutException</a></span> </dt> <dd> Thrown when a scheduled timeout happens while waiting for an async result. </dd> </dl> </section> </div> <!-- /.main-content --> <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left"> <!-- The search input and breadcrumbs below are only responsively visible at low resolutions. --> <header id="header-search-sidebar" class="hidden-l"> <form class="search-sidebar" role="search"> <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search..."> </form> </header> <ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav"> <li><a href="../index.html">Dart</a></li> <li class="self-crumb">dart:async</li> </ol> <h5><span class="package-name">Dart</span> <span class="package-kind">SDK</span></h5> <ol> <li class="section-title">Libraries</li> <li class="section-subtitle">Core</li> <li class="section-subitem"><a href="../dart-async/dart-async-library.html">dart:async</a></li> <li class="section-subitem"><a href="../dart-collection/dart-collection-library.html">dart:collection</a></li> <li class="section-subitem"><a href="../dart-convert/dart-convert-library.html">dart:convert</a></li> <li class="section-subitem"><a href="../dart-core/dart-core-library.html">dart:core</a></li> <li class="section-subitem"><a href="../dart-developer/dart-developer-library.html">dart:developer</a></li> <li class="section-subitem"><a href="../dart-math/dart-math-library.html">dart:math</a></li> <li class="section-subitem"><a href="../dart-typed_data/dart-typed_data-library.html">dart:typed_data</a></li> <li class="section-subtitle">VM</li> <li class="section-subitem"><a href="../dart-ffi/dart-ffi-library.html">dart:ffi</a></li> <li class="section-subitem"><a href="../dart-io/dart-io-library.html">dart:io</a></li> <li class="section-subitem"><a href="../dart-isolate/dart-isolate-library.html">dart:isolate</a></li> <li class="section-subitem"><a href="../dart-mirrors/dart-mirrors-library.html">dart:mirrors</a></li> <li class="section-subtitle">Web</li> <li class="section-subitem"> <a href="https://pub.dev/documentation/web/latest/" target="_blank"> package:web <span class="material-symbols-outlined">open_in_new</span> </a> </li> <li class="section-subitem"><a href="../dart-js_interop/dart-js_interop-library.html">dart:js_interop</a></li> <li class="section-subitem"><a href="../dart-js_interop_unsafe/dart-js_interop_unsafe-library.html">dart:js_interop_unsafe</a></li> <li class="section-subtitle">Web (Legacy)</li> <li class="section-subitem"> <a href="https://pub.dev/documentation/js/latest/" target="_blank"> package:js <span class="material-symbols-outlined">open_in_new</span> </a> </li> <li class="section-subitem"><a href="../dart-html/dart-html-library.html">dart:html</a></li> <li class="section-subitem"><a href="../dart-indexed_db/dart-indexed_db-library.html">dart:indexed_db</a></li> <li class="section-subitem"><a href="../dart-js/dart-js-library.html">dart:js</a></li> <li class="section-subitem"><a href="../dart-js_util/dart-js_util-library.html">dart:js_util</a></li> <li class="section-subitem"><a href="../dart-svg/dart-svg-library.html">dart:svg</a></li> <li class="section-subitem"><a href="../dart-web_audio/dart-web_audio-library.html">dart:web_audio</a></li> <li class="section-subitem"><a href="../dart-web_gl/dart-web_gl-library.html">dart:web_gl</a></li> </ol> </div> <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right"> <h5>dart:async library</h5> </div><!--/sidebar-offcanvas-right--> </main> <footer> <span class="no-break"> Dart 3.5.4 </span> <span class="glue-footer"> <span class="no-break"> | <a href="https://dart.dev/terms" title="Terms of use">Terms</a> </span> <span class="no-break"> | <a href="https://policies.google.com/privacy" target="_blank" rel="noopener" title="Privacy policy" class="no-automatic-external">Privacy</a> </span> <span class="no-break"> | <a href="https://dart.dev/security" title="Security philosophy and practices">Security</a> </span> <div class="copyright" style="font-size: 0.9em; color: darkgrey; margin-top: 0.5em;"> Except as otherwise noted, this site is licensed under a <a style="color: darkgrey;" href="https://creativecommons.org/licenses/by/4.0/"> Creative Commons Attribution 4.0 International License</a> and code samples are licensed under the <a style="color: darkgrey;" href="https://opensource.org/licenses/BSD-3-Clause" class="no-automatic-external"> 3-Clause BSD License</a> </div> </span> </footer> <script src="../static-assets/highlight.pack.js?v1"></script> <script src="../static-assets/docs.dart.js"></script> <button aria-hidden="true" class="glue-footer__link glue-cookie-notification-bar-control"> Cookies management controls </button> <script src="https://www.gstatic.com/glue/cookienotificationbar/cookienotificationbar.min.js" data-glue-cookie-notification-bar-category="2B"> </script> </body> </html>