Skip to content

Dart

Welcome!

Welcome to the Dart API reference documentation, covering the Dart core libraries. These include:

  • dart:core: Core functionality such as strings, numbers, collections, errors, dates, and URIs.
  • dart:io: I/O for non-web apps.
  • dart:async: Functionality for asynchronous programming with futures, streams, and zones.

You'll also find reference documentation covering Dart's various platform interoperability options, such as:

  • dart:js_interop: Library including a sound type hierarchy and helper functions for interoperability with JavaScript.
  • package:web: DOM manipulation for web apps.
  • dart:ffi: Foreign function interfaces for interoperability with the C language.

The core libraries - except for dart:core - must be imported before they're available for use:

dart
import 'dart:math';

Additionally, you can find Dart packages at pub.dev.

Language docs

The main site for learning and using Dart is dart.dev. Check out these pages:

This API reference is generated from the SDK source at dart-lang/sdk. If you'd like to give feedback on or edit this documentation, see Contributing.

Libraries

LibraryDescription
dart:asyncSupport for asynchronous programming, with classes such as Future and Stream.
dart:collectionClasses and utilities that supplement the collection support in dart:core.
dart:convertEncoders and decoders for converting between different data representations, including JSON and UTF-8.
dart:coreBuilt-in types, collections, and other core functionality for every Dart program.
dart:developerInteract with developer tools such as the debugger and inspector.
dart:ffiForeign Function Interface for interoperability with the C programming language.
dart:htmlHTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model).
dart:indexed_dbA client-side key-value store with support for indexes.
dart:ioFile, socket, HTTP, and other I/O support for non-web applications.
dart:isolateConcurrent programming using isolates: independent workers that are similar to threads but don't share memory, communicating only via messages.
dart:jsLow-level support for interoperating with JavaScript.
dart:js_interopInteroperability, "interop" for short, with JavaScript and browser APIs.
dart:js_interop_unsafeUtility methods to manipulate JavaScript objects dynamically.
dart:js_utilUtility methods to manipulate package:js annotated JavaScript interop objects in cases where the name to call is not known at runtime.
dart:mathMathematical constants and functions, plus a random number generator.
dart:mirrorsBasic reflection in Dart, with support for introspection and dynamic invocation.
dart:svgScalable Vector Graphics: Two-dimensional vector graphics with support for events and animation.
dart:typed_dataLists that efficiently handle fixed sized data (for example, unsigned 8 byte integers) and SIMD numeric types.
dart:web_audioHigh-fidelity audio programming in the browser.
dart:web_gl3D programming in the browser.