Changing Theme Colors
Primary Colors
To modify the primary colors of the application:
- Navigate to
lib/src/theme/app_colors.dart
- Locate the
AppColors
class - Modify the following properties:dart
static const Color primary = Colors.orange; // Main brand color static const Color primaryDark = Color(0xFFE6A600); // Darker shade of primary
Theme-Specific Colors
The app uses a comprehensive color system that adapts to light and dark themes. To customize these colors:
- Open
lib/src/theme/app_colors.dart
- Find the color constants you want to modify. The colors are organized into categories:
- Background colors (
lightBackground
,darkBackground
) - Surface colors (
lightSurface
,darkSurface
) - Card background colors (
lightCardBackground
,darkCardBackground
) - Text colors (
lightPrimaryText
,darkPrimaryText
, etc.) - Border colors (
lightBorder
,darkBorder
) - Status colors (
success
,error
,warning
,info
) - Price colors (
priceColor
,originalPriceColor
)
- Background colors (
Using Theme Colors in Code
The AppColors
class provides helper methods to get the appropriate color based on the current theme:
dart
// Get background color
Color bgColor = AppColors.getBackgroundColor(context);
// Get text color
Color textColor = AppColors.getPrimaryTextColor(context);
// Get border color
Color borderColor = AppColors.getBorderColor(context);
Screenshots
Example of theme color configuration in the app