Skip to content

Upcoming deprecation of legacy HTML and JavaScript libraries #6278

Closed
@MaryaBelanger

Description

@MaryaBelanger

From Dart Announcements:

Earlier this year, we launched a new set of Dart libraries for JavaScript interop and package:web to access browser features. These APIs are designed to maximize performance, minimize compiled code size, and enable compatibility when your Dart and Flutter applications target JavaScript, WebAssembly, or both.

Now that these new APIs have been out for a year, it's time to sunset the legacy APIs that have been replaced. Starting with the first stable release of Dart and Flutter in 2025, the following dart: libraries will be deprecated:

  • dart:html
  • dart:indexed_db
  • dart:js
  • dart:js_util
  • dart:svg
  • dart:web_audio
  • dart:web_gl

We will also deprecate package:js.

While these APIs will still be available, developers will start seeing warnings about their use. Packages that depend on them will also see their score on pub.dev drop. Final removal of the legacy Dart SDK libraries is being discussed for the end of 2025.

To learn about alternatives, read the JavaScript interoperability guide. If you have issues, feel free to comment on the tracking issue.


To do: determine whether deprecation notices should be placed around the site, or content should be removed

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a.librariesRelating to the Dart standard libraries.dev.interopRelates to use of native code as part of your Dart appe2-daysCan complete in < 5 days of normal, not dedicated, workp2-mediumNecessary but not urgent concern. Resolve when possible.target.webTarget apps on the web platform

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions