Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

dart.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.

Learn more
Dart's core libraries

Dart 3.10 is taking off with dot shorthands, stable build hooks, nuanced deprecation annotations, and more!Learn more

Dart has a rich set of core libraries that provide essentials for many everyday programming tasks such as working on collections of objects (dart:collection), making calculations (dart:math), and encoding/decoding data (dart:convert). Additional APIs are available incommonly used packages.

Library tour

#

The following guides cover how to use major features of Dart's core libraries. They provide just an overview, and are by no means comprehensive. Whenever you need more details about a library or its members, consult theDart API reference.

dart:core

Built-in types, collections, and other core functionality. This library is automatically imported into every Dart program.

dart:async

Support for asynchronous programming, with classes such as Future and Stream.

dart:math

Mathematical constants and functions, plus a random number generator.

dart:convert

Encoders and decoders for converting between different data representations, including JSON and UTF-8.

dart:io

I/O for programs that can use the Dart VM, including Flutter apps, servers, and command-line scripts.

dart:js_interop

APIs for interop with the web platform. Along withpackage:web,dart:js_interop replacesdart:html.

As mentioned, these pages are just an overview; they cover only a few dart:* libraries and no third-party libraries.

For an overview of all libraries that Dart supports on different platforms, check out theMulti-platform libraries,Native platform libraries, andWeb platform libraries lists below.

Other places to find library information are thepub.dev site and theDart web developer library guide. You can find API documentation for all dart:* libraries in theDart API reference or, if you're using Flutter, theFlutter API reference.

To learn more about the Dart language, check out thelanguage documentation and samples.

Multi-platform libraries

#

The following table lists the Dart core libraries that work on allDart platforms.

LibraryNotes
dart:core
Built-in types, collections, and other core functionality for every Dart program.
dart:async ,package:async
Support for asynchronous programming, with classes such asFuture andStream .
package:async provides additional utilities around theFuture andStream types.
dart:collection ,package:collection
Classes and utilities that supplement the collection support indart:core .
package:collection provides further collection implementations and functions for working on and with collections.
dart:convert ,package:convert
Encoders and decoders for converting between different data representations, including JSON and UTF-8.
package:convert provides additional encoders and decoders.
dart:developer
Interaction with developer tools such as the debugger and inspector.
Native JIT and thedevelopment JavaScript compiler only
dart:math
Mathematical constants and functions, plus a random number generator.
dart:typed_data ,package:typed_data
Lists that efficiently handle fixed sized data (for example, unsigned 8-byte integers) and SIMD numeric types.
package:typed_data provides further classes and functions working on typed data.

Native platform libraries

#

The following table lists the Dart core libraries that work on theDart native platform (AOT- and JIT-compiled code).

LibraryNotes
dart:ffi ,package:ffi
A foreign function interface that lets Dart code use native C APIs.
package:ffi contains utilities incl. support for converting Dart strings and C strings.
dart:io ,package:io
File, socket, HTTP, and other I/O support for non-web applications.
package:io provides functionality including support for ANSI colors, file copying, and standard exit codes.
dart:isolate
Concurrent programming using isolates: independent workers similar to threads.
dart:mirrors
Basic reflection with support for introspection and dynamic invocation.
Experimental
Native JIT only (not Flutter)

Web platform libraries

#

The following table lists the Dart core libraries that work on theDart web platform (code compiled to JavaScript). The latest, recommended tools arebolded, and legacy tools areitalicized (visitJavascript interoperability for more information).

LibraryNotes
package:web
Lightweight browser API bindings built around JS interop
Replaces alldart:* web libraries. Read themigration guide .
dart:js_interop
Interop with JavaScript and browser APIs.
Replacespackage:js.
dart:js_interop_unsafe
Utility methods to manipulate JavaScript objects dynamically.
Replacesdart:js_util.
dart:html(legacy)
HTML elements and other resources for web-based applications.
Usepackage:web instead.
dart:indexed_db(legacy)
Client-side key-value store with support for indexes.
Usepackage:web instead.
dart:js ,dart:js_util ,package:js(legacy)
Low-level primitives and higher-level annotations for JS interop.
Usedart:js_interop ordart:js_interop_unsafe instead.
dart:svg(legacy)
Scalable Vector Graphics.
Usepackage:web instead.
dart:web_audio(legacy)
High-fidelity audio programming in the browser.
Usepackage:web instead.
dart:web_gl(legacy)
3D programming in the browser.
Usepackage:web instead.
Was this page's content helpful?

Unless stated otherwise, the documentation on this site reflects Dart 3.10.0. Page last updated on 2025-9-15.View source orreport an issue.


[8]ページ先頭

©2009-2025 Movatter.jp