Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
377 changes: 300 additions & 77 deletions docs/architecture/DESIGN_SYSTEM.md

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions lib/core/app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ class AppTheme {
static const Color dark1 = Color(0xFF1D212C);
static const Color grey2 = Color(0xFF92949A);
static const Color yellow = Color(0xFFF3CA29);

/// Red color for destructive actions, sell buttons, and critical operations
/// Use for: Cancel buttons, dispute buttons, sell actions, inactive states
static const Color red1 = Color(0xFFD84D4D);

static const Color dark2 = Color(0xFF303544);
static const Color cream1 = Color(0xFFF9F8F1);
static const Color red2 = Color(0xFFEF6A6A);

// New colors

Expand All @@ -30,15 +33,20 @@ class AppTheme {

// Colors for actions
static const Color buyColor = mostroGreen;
static const Color sellColor = Color(0xFFFF8A8A);
static const Color activeColor = mostroGreen;
static const Color purpleAccent = Color(0xFF764BA2);

/// Purple color for accent elements, buttons, and decorative UI elements
/// Use for: Submit buttons, message bubbles, section accents, interactive elements
static const Color purpleButton = Color(0xFF7856AF);

// Colors for states
static const Color statusSuccess = mostroGreen;
static const Color statusWarning = Color(0xFFF3CA29);

/// Red color for error states, validation failures, and error notifications
/// Use for: Error messages, failed operations, validation errors
static const Color statusError = Color(0xFFEF6A6A);

static const Color statusActive = mostroGreen;
static const Color statusInfo = Color.fromARGB(255, 42, 123, 214);

Expand Down
6 changes: 3 additions & 3 deletions lib/features/chat/widgets/message_bubble.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class MessageBubble extends ConsumerWidget {
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: isFromPeer ? _getPeerMessageColor(peerPubkey) : AppTheme.purpleAccent,
color: isFromPeer ? _getPeerMessageColor(peerPubkey) : AppTheme.purpleButton,
borderRadius: BorderRadius.only(
topLeft: const Radius.circular(16),
topRight: const Radius.circular(16),
Expand Down Expand Up @@ -87,7 +87,7 @@ class MessageBubble extends ConsumerWidget {
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: isFromPeer ? _getPeerMessageColor(peerPubkey) : AppTheme.purpleAccent,
color: isFromPeer ? _getPeerMessageColor(peerPubkey) : AppTheme.purpleButton,
borderRadius: BorderRadius.only(
topLeft: const Radius.circular(16),
topRight: const Radius.circular(16),
Expand Down Expand Up @@ -125,7 +125,7 @@ class MessageBubble extends ConsumerWidget {
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
decoration: BoxDecoration(
color: isFromPeer ? _getPeerMessageColor(peerPubkey) : AppTheme.purpleAccent,
color: isFromPeer ? _getPeerMessageColor(peerPubkey) : AppTheme.purpleButton,
borderRadius: BorderRadius.only(
topLeft: const Radius.circular(16),
topRight: const Radius.circular(16),
Expand Down
2 changes: 1 addition & 1 deletion lib/features/disputes/widgets/dispute_message_bubble.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DisputeMessageBubble extends StatelessWidget {
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
decoration: BoxDecoration(
color: isFromUser ? AppTheme.purpleAccent : _getAdminMessageColor(),
color: isFromUser ? AppTheme.purpleButton : _getAdminMessageColor(),
borderRadius: BorderRadius.only(
topLeft: const Radius.circular(16),
topRight: const Radius.circular(16),
Expand Down
2 changes: 1 addition & 1 deletion lib/features/home/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class HomeScreen extends ConsumerWidget {
S.of(context)!.sellBtc,
orderType == OrderType.buy,
OrderType.buy,
AppTheme.sellColor,
AppTheme.red1,
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion lib/features/home/widgets/order_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class OrderListItem extends ConsumerWidget {
order.premium != null ? double.tryParse(order.premium!) ?? 0.0 : 0.0;
final isPremiumPositive = premiumValue >= 0;
final premiumColor =
isPremiumPositive ? AppTheme.buyColor : AppTheme.sellColor;
isPremiumPositive ? AppTheme.buyColor : AppTheme.red1;
final premiumText = premiumValue == 0
? "(0%)"
: isPremiumPositive
Expand Down
2 changes: 1 addition & 1 deletion lib/features/order/widgets/currency_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CurrencySection extends ConsumerWidget {
: S.of(context)!.selectFiatCurrencyReceive,
icon: const Text('\$',
style: TextStyle(color: AppTheme.mostroGreen, fontSize: 18)),
iconBackgroundColor: AppTheme.purpleAccent.withValues(alpha: 0.3),
iconBackgroundColor: AppTheme.purpleButton.withValues(alpha: 0.3),
child: currenciesAsync.when(
loading: () => Text(S.of(context)!.loadingCurrencies,
style: const TextStyle(color: Colors.white)),
Expand Down
6 changes: 3 additions & 3 deletions lib/features/order/widgets/premium_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PremiumSection extends StatelessWidget {
return FormSection(
title: S.of(context)!.premiumTitle,
icon: premiumValueIcon,
iconBackgroundColor: AppTheme.purpleAccent, // Purple color for premium
iconBackgroundColor: AppTheme.purpleButton, // Purple color for premium
infoTooltip: S.of(context)!.premiumTooltip,
infoTitle: S.of(context)!.premiumTitle,
child: Column(
Expand All @@ -34,10 +34,10 @@ class PremiumSection extends StatelessWidget {
// Slider
SliderTheme(
data: SliderThemeData(
activeTrackColor: AppTheme.purpleAccent,
activeTrackColor: AppTheme.purpleButton,
inactiveTrackColor: AppTheme.backgroundInactive,
thumbColor: AppTheme.textPrimary,
overlayColor: AppTheme.purpleAccent.withValues(alpha: 0.2),
overlayColor: AppTheme.purpleButton.withValues(alpha: 0.2),
trackHeight: 4,
),
child: Slider(
Expand Down
4 changes: 2 additions & 2 deletions lib/features/order/widgets/price_type_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PriceTypeSection extends StatelessWidget {
return FormSection(
title: S.of(context)!.priceType,
icon: priceTypeIcon,
iconBackgroundColor: AppTheme.purpleAccent.withValues(
iconBackgroundColor: AppTheme.purpleButton.withValues(
alpha: 0.3), // Purple color consistent with other sections
infoTooltip: S.of(context)!.priceTypeTooltip,
infoTitle: S.of(context)!.priceType,
Expand Down Expand Up @@ -64,7 +64,7 @@ class PriceTypeSection extends StatelessWidget {
trackColor: WidgetStateProperty.resolveWith<Color?>(
(Set<WidgetState> states) {
if (states.contains(WidgetState.selected)) {
return AppTheme.purpleAccent; // Purple track when active
return AppTheme.purpleButton; // Purple track when active
}
return AppTheme.backgroundInactive; // Dark grey track when inactive
},
Expand Down
4 changes: 2 additions & 2 deletions lib/features/settings/notification_settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class NotificationSettingsScreen extends ConsumerWidget {
.updatePushNotificationsEnabled(value);
}
: null,
activeColor: AppTheme.activeColor,
activeTrackColor: AppTheme.activeColor,
),
],
),
Expand Down Expand Up @@ -277,7 +277,7 @@ class NotificationSettingsScreen extends ConsumerWidget {
Switch(
value: value,
onChanged: enabled ? onChanged : null,
activeColor: AppTheme.activeColor,
activeTrackColor: AppTheme.activeColor,
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/widgets/add_order_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class _AddOrderButtonState extends State<AddOrderButton>
? () => _navigateToCreateOrder(context, 'sell')
: null,
style: ElevatedButton.styleFrom(
backgroundColor: AppTheme.sellColor,
backgroundColor: AppTheme.red1,
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
Expand Down
4 changes: 2 additions & 2 deletions lib/shared/widgets/order_filter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ class OrderFilterState extends ConsumerState<OrderFilter> {
Text(
"${S.of(context)!.discount}: ${premiumMin.toInt()}%",
style: const TextStyle(
color: AppTheme.sellColor,
color: AppTheme.red1,
fontSize: 12,
fontWeight: FontWeight.w500,
),
Expand Down Expand Up @@ -588,7 +588,7 @@ class OrderFilterState extends ConsumerState<OrderFilter> {
Text(
"${S.of(context)!.min}: ${ratingMin.toInt()}",
style: const TextStyle(
color: AppTheme.sellColor,
color: AppTheme.red1,
fontSize: 12,
fontWeight: FontWeight.w500,
),
Expand Down