web_ libraries_ in_ flutter
Avoid using web-only libraries outside Flutter web plugin packages.
This rule is available as of Dart 2.6.0.
Rule sets: flutter
AVOID using web libraries,
dart:js_util in Flutter packages that are not web plugins. These libraries are
not supported outside a web context; functionality that depends on them will
fail at runtime in Flutter mobile, and their use is generally discouraged in
Web library access is allowed in:
- plugin packages that declare
webas a supported context
otherwise, imports of
dart:js_util are disallowed.
To enable the
avoid_web_libraries_in_flutter under linter > rules in your
linter: rules: - avoid_web_libraries_in_flutter