Dart
LogoDart

Dart

API Documentation

Beautiful, searchable API reference for the Dart SDK

API
Guide
{} </> /// .md

Highlights

Behavior, accessibility, and keyboard handling are built in. You bring the visuals.

🧩

dart:core

Fundamental types - num, String, List, Map, Set, Iterable, RegExp, DateTime, Duration, and more.

Browse →

dart:async

Asynchronous programming - Future, Stream, Completer, Timer, Zone, and scheduleMicrotask.

Browse →
📦

dart:collection

Specialized collections - HashMap, LinkedList, Queue, SplayTreeMap, UnmodifiableListView.

Browse →
🔄

dart:convert

Encoders and decoders - JSON, UTF-8, Base64, Latin-1, and custom codecs.

Browse →
🗂️

dart:io

I/O for servers and CLI - File, Directory, HttpClient, Socket, Process, Platform.

Browse →
🔢

dart:math

Mathematical constants and functions - Random, Point, Rectangle, min, max, sqrt, sin, cos.

Browse →

Core Libraries#

LibraryDescription
dart:core Fundamental types - num, String, List, Map, Set, Iterable, RegExp, DateTime, Duration
dart:async Asynchronous programming - Future, Stream, Completer, Timer, Zone, scheduleMicrotask
dart:collection Specialized collections - HashMap, LinkedList, Queue, SplayTreeMap, UnmodifiableListView
dart:convert Encoders and decoders - JSON, UTF-8, Base64, Latin-1, and custom codecs
dart:math Mathematical constants and functions - Random, Point, Rectangle, min, max, sqrt, sin, cos
dart:typed_data Efficient binary data - ByteBuffer, Uint8List, Float64List, Int32List
dart:developer Debugging and profiling - Timeline, debugger, ServiceExtension

VM Libraries#

LibraryDescription
dart:io File system, HTTP, sockets, processes, platform detection
dart:isolate Concurrent programming with isolated memory spaces
dart:ffi Foreign function interface for calling C code

Web Libraries#

LibraryDescription
dart:js_interop Type-safe JavaScript interop
dart:html DOM manipulation, events, HTTP requests (legacy)

Quick Example#

import 'dart:async';
import 'dart:convert';

void main() async {
  // Futures and async/await
  final response = await fetchData();

  // JSON encoding/decoding
  final data = jsonDecode(response);
  print('Name: ${data['name']}');

  // Streams
  Stream.periodic(Duration(seconds: 1), (i) => i)
    .take(5)
    .listen((value) => print('Tick: $value'));
}

Future<String> fetchData() async {
  await Future.delayed(Duration(milliseconds: 100));
  return '{"name": "Dart", "version": "3.x"}';
}

Learn More#