https://dart.dev/interop/js-interop
Users of package:js will find the syntax and semantics of dart:js_interop familiar. You may be able to migrate to dart:js_interop by replacing the class definition with an extension type and have it work in many cases.