dart:core
Fundamental types - num, String, List, Map, Set, Iterable, RegExp, DateTime, Duration, and more.
Browse →API Documentation
Beautiful, searchable API reference for the Dart SDK
Behavior, accessibility, and keyboard handling are built in. You bring the visuals.
Fundamental types - num, String, List, Map, Set, Iterable, RegExp, DateTime, Duration, and more.
Browse →Asynchronous programming - Future, Stream, Completer, Timer, Zone, and scheduleMicrotask.
Browse →Specialized collections - HashMap, LinkedList, Queue, SplayTreeMap, UnmodifiableListView.
Browse →Encoders and decoders - JSON, UTF-8, Base64, Latin-1, and custom codecs.
Browse →I/O for servers and CLI - File, Directory, HttpClient, Socket, Process, Platform.
Browse →Mathematical constants and functions - Random, Point, Rectangle, min, max, sqrt, sin, cos.
Browse →| Library | Description |
|---|---|
| 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 |
| Library | Description |
|---|---|
| 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 |
| Library | Description |
|---|---|
| dart:js_interop | Type-safe JavaScript interop |
| dart:html | DOM manipulation, events, HTTP requests (legacy) |
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"}';
}