235 lines
11 KiB
Dart
235 lines
11 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class LightAppColors {
|
|
LightAppColors._();
|
|
|
|
static const hint = Color.fromARGB(255, 88, 88, 88);
|
|
static const inputBorder = Color.fromARGB(255, 14, 63, 102);
|
|
static const primary = Color.fromARGB(255, 33, 150, 243);
|
|
static const slectedTitle = Color.fromARGB(255, 153, 207, 249);
|
|
static const slectedText = Color.fromARGB(255, 153, 207, 249);
|
|
static const confirmButton = Color.fromARGB(255, 76, 175, 80);
|
|
static const popupText = Color.fromARGB(255, 157, 157, 155);
|
|
static const confirmPopup = Color.fromARGB(255, 23, 107, 173);
|
|
static const nearbyPopup = Color.fromARGB(255, 233, 245, 254);
|
|
static const nearbyPopuphint = Color.fromARGB(255, 112, 112, 110);
|
|
static const productDetailDivider = Color.fromARGB(255, 112, 112, 110);
|
|
static const fillOrder = Color.fromARGB(255, 200, 230, 201);
|
|
static const fillOrderText = Color.fromARGB(255, 32, 74, 34);
|
|
static const allReviewOpener = Color.fromARGB(255, 183, 28, 28);
|
|
static const hintTitle = Color.fromARGB(255, 73, 69, 79);
|
|
static const cardBackground = Color.fromARGB(255, 242, 242, 241);
|
|
static const offerTimer = Color.fromARGB(255, 244, 67, 54);
|
|
static const offerCardDetail = Color.fromARGB(255, 73, 69, 79);
|
|
static const divider = Color.fromARGB(255, 189, 189, 188);
|
|
static const textPrice = Color.fromARGB(255, 85, 84, 81);
|
|
static const deliverySelectedButton = Color.fromARGB(255, 237, 247, 238);
|
|
static const loadingBorder = Color.fromARGB(255, 239, 239, 239);
|
|
static const profileField = Color.fromARGB(255, 252, 252, 252);
|
|
static const trunOff_On = Color.fromARGB(255, 78, 70, 180);
|
|
static const nearbyTuggleButton = Color.fromARGB(255, 22, 92, 150);
|
|
static const selectedBGButton = Color.fromARGB(255, 14, 63, 102);
|
|
static const selectedTextNearby = Colors.white;
|
|
static const nearbyIconSelcted = Color.fromARGB(255, 233, 245, 254);
|
|
|
|
// Active/Old toggle colors
|
|
static const activeOfferBackground = Color.fromARGB(17, 77, 77, 77);
|
|
static const oldOfferBackground = Color.fromARGB(17, 77, 77, 77);
|
|
|
|
// Additional colors for comprehensive dark mode support
|
|
static const buttonPrimary = Color.fromARGB(255, 30, 137, 221);
|
|
static const borderPrimary = Color.fromARGB(255, 14, 63, 102);
|
|
static const errorColor = Color.fromARGB(255, 244, 67, 54);
|
|
static const checkboxActive = Color.fromARGB(255, 33, 150, 243);
|
|
static const shadowColor = Color.fromARGB(
|
|
51,
|
|
0,
|
|
0,
|
|
0,
|
|
); // black with 0.2 opacity
|
|
static const greyBorder = Color.fromARGB(255, 189, 189, 189);
|
|
static const secondaryText = Color.fromARGB(255, 117, 117, 117);
|
|
|
|
// Common colors for both themes
|
|
static const scaffoldBackground = Colors.white;
|
|
static const textPrimary = Colors.black;
|
|
static const textSecondary = Color.fromARGB(255, 88, 88, 88);
|
|
static const surface = Colors.white;
|
|
}
|
|
|
|
class DarkAppColors {
|
|
DarkAppColors._();
|
|
|
|
static const hint = Color.fromARGB(255, 180, 180, 180);
|
|
static const inputBorder = Color.fromARGB(255, 100, 149, 237);
|
|
static const primary = Color.fromARGB(255, 100, 181, 246);
|
|
static const slectedTitle = Color.fromARGB(255, 144, 202, 249);
|
|
static const slectedText = Color.fromARGB(255, 144, 202, 249);
|
|
static const confirmButton = Color.fromARGB(255, 102, 187, 106);
|
|
static const popupText = Color.fromARGB(255, 180, 180, 180);
|
|
static const confirmPopup = Color.fromARGB(255, 66, 165, 245);
|
|
static const nearbyPopup = Color.fromARGB(255, 33, 47, 61);
|
|
static const nearbyPopuphint = Color.fromARGB(255, 158, 158, 158);
|
|
static const productDetailDivider = Color.fromARGB(255, 158, 158, 158);
|
|
static const fillOrder = Color.fromARGB(255, 56, 142, 60);
|
|
static const fillOrderText = Color.fromARGB(255, 200, 230, 201);
|
|
static const allReviewOpener = Color.fromARGB(255, 244, 67, 54);
|
|
static const hintTitle = Color.fromARGB(255, 189, 189, 189);
|
|
static const cardBackground = Color.fromARGB(255, 42, 55, 66);
|
|
static const offerTimer = Color.fromARGB(255, 244, 67, 54);
|
|
static const offerCardDetail = Color.fromARGB(255, 189, 189, 189);
|
|
static const divider = Color.fromARGB(255, 97, 97, 97);
|
|
static const textPrice = Color.fromARGB(255, 189, 189, 189);
|
|
static const deliverySelectedButton = Color.fromARGB(255, 46, 125, 50);
|
|
static const loadingBorder = Color.fromARGB(255, 34, 48, 60);
|
|
static const profileField = Color.fromARGB(255, 34, 48, 60);
|
|
static const trunOff_On = Color.fromARGB(255, 121, 134, 203);
|
|
static const nearbyTuggleButton = Color.fromARGB(255, 14, 63, 102);
|
|
static const selectedBGButton = Color.fromARGB(255, 14, 63, 102);
|
|
static const selectedTextNearby = Color.fromARGB(255, 100, 181, 251);
|
|
static const nearbyIconSelcted = Color.fromARGB(255, 100, 181, 251);
|
|
|
|
// Active/Old toggle colors - Different colors for dark mode
|
|
static const activeOfferBackground = Color.fromARGB(255, 30, 42, 56);
|
|
static const oldOfferBackground = Color.fromARGB(255, 45, 45, 45);
|
|
|
|
// Additional colors for comprehensive dark mode support
|
|
static const buttonPrimary = Color.fromARGB(255, 100, 181, 246);
|
|
static const borderPrimary = Color.fromARGB(255, 100, 149, 237);
|
|
static const errorColor = Color.fromARGB(255, 244, 67, 54);
|
|
static const checkboxActive = Color.fromARGB(255, 100, 181, 246);
|
|
static const shadowColor = Color.fromARGB(120, 22, 92, 150); // white with 0.3 opacity for dark theme
|
|
static const greyBorder = Color.fromARGB(255, 97, 97, 97);
|
|
static const secondaryText = Color.fromARGB(255, 189, 189, 189);
|
|
|
|
// Dark theme specific colors
|
|
static const scaffoldBackground = Color.fromARGB(255, 21, 32, 43);
|
|
static const textPrimary = Colors.white;
|
|
static const textSecondary = Color.fromARGB(255, 180, 180, 180);
|
|
static const surface = Color.fromARGB(255, 21, 32, 43);
|
|
}
|
|
|
|
// App colors that dynamically switch based on theme
|
|
class AppColors {
|
|
static bool _isDarkMode = false;
|
|
|
|
static void setDarkMode(bool isDark) {
|
|
_isDarkMode = isDark;
|
|
}
|
|
|
|
static bool get isDarkMode => _isDarkMode;
|
|
|
|
static Color get hint =>
|
|
_isDarkMode ? DarkAppColors.hint : LightAppColors.hint;
|
|
static Color get inputBorder =>
|
|
_isDarkMode ? DarkAppColors.inputBorder : LightAppColors.inputBorder;
|
|
static Color get primary =>
|
|
_isDarkMode ? DarkAppColors.primary : LightAppColors.primary;
|
|
static Color get slectedTitle =>
|
|
_isDarkMode ? DarkAppColors.slectedTitle : LightAppColors.slectedTitle;
|
|
static Color get slectedText =>
|
|
_isDarkMode ? DarkAppColors.slectedText : LightAppColors.slectedText;
|
|
static Color get confirmButton =>
|
|
_isDarkMode ? DarkAppColors.confirmButton : LightAppColors.confirmButton;
|
|
static Color get popupText =>
|
|
_isDarkMode ? DarkAppColors.popupText : LightAppColors.popupText;
|
|
static Color get confirmPopup =>
|
|
_isDarkMode ? DarkAppColors.confirmPopup : LightAppColors.confirmPopup;
|
|
static Color get nearbyPopup =>
|
|
_isDarkMode ? DarkAppColors.nearbyPopup : LightAppColors.nearbyPopup;
|
|
static Color get nearbyPopuphint =>
|
|
_isDarkMode
|
|
? DarkAppColors.nearbyPopuphint
|
|
: LightAppColors.nearbyPopuphint;
|
|
static Color get productDetailDivider =>
|
|
_isDarkMode
|
|
? DarkAppColors.productDetailDivider
|
|
: LightAppColors.productDetailDivider;
|
|
static Color get fillOrder =>
|
|
_isDarkMode ? DarkAppColors.fillOrder : LightAppColors.fillOrder;
|
|
static Color get fillOrderText =>
|
|
_isDarkMode ? DarkAppColors.fillOrderText : LightAppColors.fillOrderText;
|
|
static Color get allReviewOpener =>
|
|
_isDarkMode
|
|
? DarkAppColors.allReviewOpener
|
|
: LightAppColors.allReviewOpener;
|
|
static Color get hintTitle =>
|
|
_isDarkMode ? DarkAppColors.hintTitle : LightAppColors.hintTitle;
|
|
static Color get cardBackground =>
|
|
_isDarkMode
|
|
? DarkAppColors.cardBackground
|
|
: LightAppColors.cardBackground;
|
|
static Color get offerTimer =>
|
|
_isDarkMode ? DarkAppColors.offerTimer : LightAppColors.offerTimer;
|
|
static Color get offerCardDetail =>
|
|
_isDarkMode
|
|
? DarkAppColors.offerCardDetail
|
|
: LightAppColors.offerCardDetail;
|
|
static Color get divider =>
|
|
_isDarkMode ? DarkAppColors.divider : LightAppColors.divider;
|
|
static Color get textPrice =>
|
|
_isDarkMode ? DarkAppColors.textPrice : LightAppColors.textPrice;
|
|
static Color get deliverySelectedButton =>
|
|
_isDarkMode
|
|
? DarkAppColors.deliverySelectedButton
|
|
: LightAppColors.deliverySelectedButton;
|
|
static Color get loadingBorder =>
|
|
_isDarkMode ? DarkAppColors.loadingBorder : LightAppColors.loadingBorder;
|
|
static Color get profileField =>
|
|
_isDarkMode ? DarkAppColors.profileField : LightAppColors.profileField;
|
|
static Color get trunOff_On =>
|
|
_isDarkMode ? DarkAppColors.trunOff_On : LightAppColors.trunOff_On;
|
|
static Color get buttonPrimary =>
|
|
_isDarkMode ? DarkAppColors.buttonPrimary : LightAppColors.buttonPrimary;
|
|
static Color get borderPrimary =>
|
|
_isDarkMode ? DarkAppColors.borderPrimary : LightAppColors.borderPrimary;
|
|
static Color get errorColor =>
|
|
_isDarkMode ? DarkAppColors.errorColor : LightAppColors.errorColor;
|
|
static Color get checkboxActive =>
|
|
_isDarkMode
|
|
? DarkAppColors.checkboxActive
|
|
: LightAppColors.checkboxActive;
|
|
static Color get shadowColor =>
|
|
_isDarkMode ? DarkAppColors.shadowColor : LightAppColors.shadowColor;
|
|
static Color get greyBorder =>
|
|
_isDarkMode ? DarkAppColors.greyBorder : LightAppColors.greyBorder;
|
|
static Color get secondaryText =>
|
|
_isDarkMode ? DarkAppColors.secondaryText : LightAppColors.secondaryText;
|
|
static Color get scaffoldBackground =>
|
|
_isDarkMode
|
|
? DarkAppColors.scaffoldBackground
|
|
: LightAppColors.scaffoldBackground;
|
|
static Color get textPrimary =>
|
|
_isDarkMode ? DarkAppColors.textPrimary : LightAppColors.textPrimary;
|
|
static Color get textSecondary =>
|
|
_isDarkMode ? DarkAppColors.textSecondary : LightAppColors.textSecondary;
|
|
static Color get surface =>
|
|
_isDarkMode ? DarkAppColors.surface : LightAppColors.surface;
|
|
static Color get nearbyToggleButton =>
|
|
_isDarkMode
|
|
? DarkAppColors.nearbyTuggleButton
|
|
: LightAppColors.nearbyTuggleButton;
|
|
static Color get selectedBGButton =>
|
|
_isDarkMode
|
|
? DarkAppColors.selectedBGButton
|
|
: LightAppColors.selectedBGButton;
|
|
static Color get selectedTextNearby =>
|
|
_isDarkMode
|
|
? DarkAppColors.selectedTextNearby
|
|
: LightAppColors.selectedTextNearby;
|
|
static Color get nearbyIconSelected =>
|
|
_isDarkMode
|
|
? DarkAppColors.nearbyIconSelcted
|
|
: LightAppColors.nearbyIconSelcted;
|
|
|
|
static Color get activeOfferBackground =>
|
|
_isDarkMode
|
|
? DarkAppColors.activeOfferBackground
|
|
: LightAppColors.activeOfferBackground;
|
|
|
|
static Color get oldOfferBackground =>
|
|
_isDarkMode
|
|
? DarkAppColors.oldOfferBackground
|
|
: LightAppColors.oldOfferBackground;
|
|
}
|