Why this matters
`dart:html`, `dart:js`, and `dart:js_util` are only supported in web contexts. Using them outside of Flutter web plugins leads to runtime errors.
Ensure `dart:html`, `dart:js`, and `dart:js_util` are only used in Flutter web plugins to prevent runtime errors in non-web environments.
`dart:html`, `dart:js`, and `dart:js_util` are only supported in web contexts. Using them outside of Flutter web plugins leads to runtime errors.
Side-by-side examples engineers can pattern-match during review.
import 'dart:html'; // Non compliant
import 'dart:js'; // Non compliant
import 'dart:js_util'; // Non compliant
import 'package:other_package/other_library.dart';import 'package:other_package/other_library.dart';import 'dart:html'; // Non compliant
import 'dart:js'; // Non compliant
import 'dart:js_util'; // Non compliant
import 'package:other_package/other_library.dart';import 'package:other_package/other_library.dart';From the same buckets as this rule.
For changes that affect architecture, data models, external APIs, security posture, deployment topology, or cost (>10%), create an ADR in docs/adr/ using the standard template (Context, Decision, Consequences) and link the PR and issue IDs.