Skip to content

Commit

Permalink
Updated libraries main page
Browse files Browse the repository at this point in the history
  • Loading branch information
atsansone committed May 20, 2024
1 parent f776299 commit 6929b29
Showing 1 changed file with 97 additions and 82 deletions.
179 changes: 97 additions & 82 deletions src/content/libraries/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,65 +9,65 @@ nextpage:

<style>
th:first-child {
width: 80%;
width: 25%;
}
</style>

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 in
[commonly used packages](/resources/useful-packages).
programming tasks such as working on collections of objects (`dart:collection`),
making calculations (`dart:math`), and encoding/decoding data (`dart:convert`).
Additional APIs can be found in [common packages](/resources/useful-packages).

## Library tour
## Dart major core libraries

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 the [Dart API reference.][Dart API]
They provide an overview, but aren't comprehensive.
To learn more about a library or its members,
consult the [Dart API reference][Dart API].

| Library | Capabilities |
|-------------------------------------|-------------------------------|
| [`dart:core`][dart-core-docs] | Built-in types, collections, and other core functionality. This library is automatically imported into every Dart program. |
| [`dart:async`][dart-async-docs] | Support for asynchronous programming, with classes such as Future and Stream. |
| [`dart:math`][dart-math-docs] | Mathematical constants and functions, plus a random number generator. |
| [`dart:convert`][dart-convert-docs] | Encoders and decoders for converting between different data representations, including JSON and UTF-8. |
| [`dart:io`][dart-io-docs] | I/O for programs that can use the Dart VM, including Flutter apps, servers, and command-line scripts. |
| [`package:web`][dart-web-docs] | DOM and other APIs for browser-based apps. |

[dart:core](/libraries/dart-core)
: Built-in types, collections, and other core functionality.
This library is automatically imported into every Dart program.
{:.table .table-striped}

## Learn about libraries and language

These pages cover the few broad `dart:*` libraries.
They don't cover third-party libraries.

[dart:async](/libraries/dart-async)
: Support for asynchronous programming, with classes such as Future and Stream.
### Platform-specific libraries

[dart:math](/libraries/dart-math)
: Mathematical constants and functions, plus a random number generator.
To learn about all libraries that Dart supports on different platforms,
consult the following tables on this page.

[dart:convert](/libraries/dart-convert)
: Encoders and decoders for converting between different data representations,
including JSON and UTF-8.
* [Multi-platform libraries](#multi-platform-libraries)
* [Native platform libraries](#native-platform-libraries)
* [Web platform libraries](#web-platform-libraries)

[dart:io](/libraries/dart-io)
: I/O for programs that can use the Dart VM,
including Flutter apps, servers, and command-line scripts.
### Third party libraries

[dart:html](/libraries/dart-html)
: DOM and other APIs for browser-based apps.
To learn about third-party libraries, consult the following resources.

* [pub.dev site]({{site.pub}})
* [Dart web developer library guide][webdev libraries]

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

For an overview of all libraries that Dart supports on different platforms,
check out the [Multi-platform libraries](#multi-platform-libraries),
[Native platform libraries](#native-platform-libraries), and
[Web platform libraries](#web-platform-libraries) lists below.
To learn about all of the libraries, consult the following resources.

Other places to find library information are the
[pub.dev site]({{site.pub}}) and the
[Dart web developer library guide][webdev libraries].
You can find API documentation for all dart:* libraries in the
[Dart API reference][Dart API] or, if you're using Flutter,
the [Flutter API reference][api-flutter].
* [Dart API reference][Dart API]
* [Flutter API reference][api-flutter]

### Dart language

To learn more about the Dart language,
check out the [language documentation and samples](/language).
consult the [language documentation and samples](/language).

[Dart API]: {{site.dart-api}}/{{site.sdkInfo.channel}}
[webdev libraries]: /web/libraries
Expand All @@ -78,29 +78,31 @@ check out the [language documentation and samples](/language).
The following table lists the Dart core libraries that work on all
[Dart platforms](/overview#platform).

| Library | Notes |
|-----------------------------------------------|-------------------------------|
| [`dart:core`][dart-core]<br>Built-in types, collections, and other core functionality for every Dart program. | |
| [`dart:async`][dart-async], [`package:async`][package-async]<br>Support for asynchronous programming, with classes such as `Future` and `Stream`.<br>`package:async` provides additional utilities around the `Future` and `Stream` types. | |
| [`dart:collection`][dart-collection], [`package:collection`][package-collection]<br>Classes and utilities that supplement the collection support in `dart:core`.<br>`package:collection` provides further collection implementations and functions for working on and with collections. | |
| [`dart:convert`][dart-convert], [`package:convert`][package-convert]<br>Encoders and decoders for converting between different data representations, including JSON and UTF-8.<br>`package:convert` provides additional encoders and decoders. ||
| [`dart:developer`][dart-developer]<br>Interaction with developer tools such as the debugger and inspector. | [Native JIT][jit] and the [development JavaScript compiler][] only |
| [`dart:math`][dart-math]<br>Mathematical constants and functions, plus a random number generator. | |
| [`dart:typed_data`][dart-typed_data], [`package:typed_data`][package-typed_data]<br>Lists that efficiently handle fixed sized data (for example, unsigned 8-byte integers) and SIMD numeric types.<br>`package:typed_data` provides further classes and functions working on typed data. | |
| Library | Capabilities |
|--------------------------|----------------------------------|
| [`dart:core`][dart-core] | Built-in types, collections, and other core functionality for every Dart program. |
| [`dart:async`][dart-async],<br>[`package:async`][pkg-async] | Support for asynchronous programming, with classes such as `Future` and `Stream`. `package:async` provides additional utilities around the `Future` and `Stream` types. |
| [`dart:collection`][dart-collection],<br>[`package:collection`][pkg-collection] | Classes and utilities that supplement the collection support in `dart:core`. `package:collection` provides further collection implementations and functions for working on and with collections. |
| [`dart:convert`][dart-convert],<br>[`package:convert`][pkg-convert] | Encoders and decoders for converting between different data representations, including JSON and UTF-8. `package:convert` provides additional encoders and decoders. |
| [`dart:developer`][dart-developer] | Interaction with developer tools such as the debugger and inspector.[Native JIT][jit] and the [development JavaScript compiler][] only |
| [`dart:math`][dart-math] | Mathematical constants and functions, plus a random number generator. |
| [`dart:typed_data`][dart-typed_data],<br>[`package:typed_data`][pkg-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. |

{:.table .table-striped}

## Native platform libraries

The following table lists the Dart core libraries that work on the
[Dart native platform](/overview#native-platform) (AOT- and JIT-compiled code).
[Dart native platform][dart-np] (AOT- and JIT-compiled code).

| Library | Notes |
|-----------------------------------------------|-------------------------------|
| [`dart:ffi`][dart-ffi], [`package:ffi`][package-ffi]<br>A foreign function interface that lets Dart code use native C APIs.<br>`package:ffi` contains utilities incl. support for converting Dart strings and C strings. | |
| [`dart:io`][dart-io], [`package:io`][package-io]<br>File, socket, HTTP, and other I/O support for non-web applications.<br>`package:io` provides functionality including support for ANSI colors, file copying, and standard exit codes. | |
| [`dart:isolate`][dart-isolate]<br> Concurrent programming using isolates: independent workers similar to threads. | |
| [`dart:mirrors`][dart-mirrors]<br> Basic reflection with support for introspection and dynamic invocation. | Experimental<br>[Native JIT][jit] only (_not_&nbsp;Flutter) |
| Library | Capabilities |
|--------------------------------|-------------------------------|
| [`dart:ffi`][dart-ffi] | A foreign function interface that lets Dart code use native C APIs. |
| [`package:ffi`][pkg-ffi] | `package:ffi` contains utilities include support for converting Dart strings and C strings. |
| [`dart:io`][dart-io] | File, socket, HTTP, and other I/O support for non-web applications. |
| [`package:io`][pkg-io] | `package:io` provides functionality including support for ANSI colors, file copying, and standard exit codes. |
| [`dart:isolate`][dart-isolate] | Concurrent programming using isolates: independent workers similar to threads. |
| [`dart:mirrors`][dart-mirrors] | Basic reflection with support for introspection and dynamic invocation. Experimental<br>[Native JIT][jit] only (_not_&nbsp;Flutter) |

{:.table .table-striped}

Expand All @@ -109,58 +111,71 @@ The following table lists the Dart core libraries that work on the
The following table lists the Dart core libraries that work on the
[Dart web platform](/overview#web-platform) (code compiled to JavaScript).

| Library | Notes |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------|
| [`dart:html`][dart-html]<br>HTML elements and other resources for web-based applications. | |
| [`dart:indexed_db`][dart-indexed_db]<br>Client-side key-value store with support for indexes. | |
| ~~[`dart:js`][dart-js]~~, [`dart:js_util`][dart-js_util], [`package:js`][package-js]<br>`dart:js_util` provides low-level primitives for interoperability; typically the higher-level annotations in `package:js` are recommended, as they help express interoperability more succinctly. For more details see [JavaScript interoperability][].<br>_Don't use `dart:js` directly; direct use of those legacy APIs is deprecated_. | |
| [`dart:svg`][dart-svg]<br>Scalable Vector Graphics. | |
| [`dart:web_audio`][dart-web_audio]<br>High-fidelity audio programming in the browser. | |
| [`dart:web_gl`][dart-web_gl]<br>3D programming in the browser. | |
| Library | Capabilities |
|----------------------------------------|-------------------------------|
| [`package:web`][pkg-web] | Resources for web-based applications including HTML, structured data storage, scalable vector graphics, audio, and 3d models. Replaces [`dart:html`][dart-html], [`dart:indexed_db`][dart-indexed_db], [`dart:svg`][dart-svg], [`dart:web_audio`][dart-web_audio], and [`dart:web_gl`][dart-web_gl] |
| [`package:js_interop`][pkg-js-interop], [`package:js_interop_unsafe`][pkg-js-interop-us] | Contains all the necessary members, including @JS, JS types, conversion functions, and various utility functions. `dart:js_interop_unsafe` contains members to look up properties dynamically. Replaces [`package:js`][pkg-js], [`dart:js`][dart-js], and [`dart:js_util`][dart-js_util] |

{:.table .table-striped}


<!---
{% comment %}
Multi-platform libraries
-->
{% endcomment %}

[dart-core]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-core/dart-core-library.html
[dart-async]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-async/dart-async-library.html
[package-async]: {{site.pub-pkg}}/async
[pkg-async]: {{site.pub-pkg}}/async
[dart-collection]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-collection/dart-collection-library.html
[package-collection]: {{site.pub-pkg}}/collection
[pkg-collection]: {{site.pub-pkg}}/collection
[dart-convert]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-convert/dart-convert-library.html
[package-convert]: {{site.pub-pkg}}/convert
[pkg-convert]: {{site.pub-pkg}}/convert
[dart-developer]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-developer/dart-developer-library.html
[dart-math]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-math/dart-math-library.html
[dart-typed_data]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-typed_data/dart-typed_data-library.html
[package-typed_data]: {{site.pub-pkg}}/typed_data
[pkg-typed_data]: {{site.pub-pkg}}/typed_data

<!---
{% comment %}
Native platform libraries
-->
{% endcomment %}

[dart-ffi]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-ffi/dart-ffi-library.html
[package-ffi]: {{site.pub-pkg}}/ffi
[pkg-ffi]: {{site.pub-pkg}}/ffi
[dart-io]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-io/dart-io-library.html
[package-io]: {{site.pub-pkg}}/io
[pkg-io]: {{site.pub-pkg}}/io
[dart-isolate]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-isolate/dart-isolate-library.html
[dart-mirrors]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-mirrors/dart-mirrors-library.html

<!---
{% comment %}
Web platform libraries
-->
{% endcomment %}

[pkg-web]: {{site.pub-pkg}}/web
[dart-html]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-html/dart-html-library.html
[dart-indexed_db]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-indexed_db/dart-indexed_db-library.html
[dart-js]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js/dart-js-library.html
[package-js]: {{site.pub-pkg}}/js
[pkg-js]: {{site.pub-pkg}}/js
[dart-js_util]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js_util/dart-js_util-library.html
[dart-svg]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-svg/dart-svg-library.html
[dart-web_audio]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-web_audio/dart-web_audio-library.html
[dart-web_gl]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-web_gl/dart-web_gl-library.html
[pkg-js-interop]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js_interop/dart-js_interop-library.html
[pkg-js-interop-us]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js_interop_unsafe/dart-js_interop_unsafe-library.html

{% comment %}
Miscellaneous
{% endcomment %}

<!---
Misc
-->
[dart-np]: /overview#native-platform
[development JavaScript compiler]: /tools/webdev#serve
[jit]: /overview#native-platform
[JavaScript interoperability]: /interop/js-interop

{% comment %}
Core libraries
{% endcomment %}

[dart-core-docs]: /libraries/dart-core
[dart-async-docs]: /libraries/dart-async
[dart-math-docs]: /libraries/dart-math
[dart-convert-docs]: /libraries/dart-convert
[dart-io-docs]: /libraries/dart-io
[dart-web-docs]: /interop/js-interop/package-web

0 comments on commit 6929b29

Please sign in to comment.