Why this matters
Improves readability and makes changes safer and centralized.
Replace raw numeric/string literals used for dimensions, durations, and thresholds with named constants.
Improves readability and makes changes safer and centralized.
Side-by-side examples engineers can pattern-match during review.
return Padding(padding: EdgeInsets.all(16), child: SizedBox(height: 48));const kScreenPadding = 16.0;
const kButtonHeight = 48.0;
return Padding(padding: const EdgeInsets.all(kScreenPadding), child: const SizedBox(height: kButtonHeight));EdgeInsets.all(12)const kGap = 12.0; EdgeInsets.all(kGap)From the same buckets as this rule.