Files
syncrow-web/lib/utils/theme/theme.dart
Faris Armoush 99924c1e62 Refactor color management and UI components for consistency
- Updated color references in various widgets to use the new `opaquePrimary` color for better visual consistency.
- Refactored `ColorsManager` to improve color definitions and removed redundant color declarations.
- Enhanced UI elements across multiple dialogs and widgets to ensure a cohesive design language.

This change promotes maintainability and aligns with the updated color scheme.
2025-07-24 10:27:17 +03:00

59 lines
1.8 KiB
Dart

import 'package:flutter/material.dart';
import 'package:syncrow_web/utils/color_manager.dart';
final myTheme = ThemeData(
fontFamily: 'Aftika',
useMaterial3: true,
textTheme: const TextTheme(
bodySmall: TextStyle(
fontSize: 13,
color: ColorsManager.white,
fontWeight: FontWeight.normal,
),
bodyMedium: TextStyle(color: Colors.black87, fontSize: 14),
bodyLarge: TextStyle(fontSize: 16, color: Colors.white),
headlineSmall: TextStyle(color: Colors.black87, fontSize: 18),
headlineMedium: TextStyle(color: Colors.black87, fontSize: 20),
headlineLarge: TextStyle(
color: Colors.white,
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
colorScheme: ColorScheme.fromSeed(
seedColor: ColorsManager.blueColor,
primary: ColorsManager.blueColor,
onSurface: Colors.grey.shade400,
),
switchTheme: SwitchThemeData(
thumbColor: WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.selected)) {
return ColorsManager.blueColor;
}
return ColorsManager.white;
}),
trackColor: WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.selected)) {
return ColorsManager.blueColor.withOpacity(0.5);
}
return ColorsManager.white;
}),
),
checkboxTheme: CheckboxThemeData(
fillColor: WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.selected)) {
return ColorsManager.blueColor;
}
return Colors.grey.shade200;
}),
checkColor: WidgetStateProperty.all(Colors.white),
side: const BorderSide(color: ColorsManager.white),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4),
),
),
dialogTheme: const DialogThemeData(
backgroundColor: ColorsManager.white,
),
);