Why this matters
Const widgets are canonicalized and not rebuilt unnecessarily.
Mark compile-time constants and constant widgets with `const` to reduce rebuild cost and GC pressure.
Const widgets are canonicalized and not rebuilt unnecessarily.
Side-by-side examples engineers can pattern-match during review.
return SizedBox(height: 16);return const SizedBox(height: 16);Text('Hello')const Text('Hello')From the same buckets as this rule.
All static JS/CSS/font/image files MUST use content-hashed filenames (e.g., app.9c1a7b.js) and be served with "Cache-Control: public, max-age=31536000, immutable". HTML and other non-fingerprinted documents MUST be served with "Cache-Control: no-cache" (or equivalent) to enable conditional revalidation.