Upcoming deprecation of legacy HTML and JavaScript libraries

196 views
Skip to first unread message

Kevin Moore

unread,
Dec 14, 2024, 12:56:21 AM12/14/24
to anno...@dartlang.org, flutter-...@googlegroups.com

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.

Reply all
Reply to author
Forward
0 new messages