Skip to content

🎨 Colors, Themes & Styles Standards for Flutter

Common Violations

DO NOT Violate These Rules

  1. Don't hardcode colors or use Colors.white or Colors.black directly from flutter's Colors class instead use the colors defined in app_colors.dart.
  2. Don't use inconsistent spacing - Use UI helper constants
  3. Don't ignore theme persistence - Always persist theme changes if needed.

ALWAYS Follow These Rules

  1. Use centralized color classes defined in app_colors.dart for consistent color management
  2. Add the general UI component (ike dialogs, Bottom Sheets, etc.) theme in ThemeData in the app_theme.dart file and avoid hardcoding the theme in the widgets unless it's absolutely necessary.
  3. Always use the spacing, padding, margin, etc. constants defined in app_spacing.dart for consistent spacing.
  4. You can add new constants to the ui_helper.dart file if needed (do not forget to notify the team about the new constants).