Refactor theme colors and styles across the application
- Introduced AppColors class to centralize color definitions for better maintainability and consistency. - Updated various screens (Settings, Vault Access, Note Card, etc.) to use AppColors for styling instead of hardcoded colors. - Enhanced UI elements with improved color contrast and accessibility. - Replaced gradient backgrounds with defined color schemes for a cohesive look. - Refactored button styles and text colors to align with the new theme structure.
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:notas/theme/app_colors.dart';
|
||||
|
||||
class AppTheme {
|
||||
static ThemeData theme({Color seedColor = Colors.amber}) {
|
||||
final Brightness foregroundBrightness =
|
||||
ThemeData.estimateBrightnessForColor(seedColor);
|
||||
final Color foregroundColor =
|
||||
foregroundBrightness == Brightness.dark ? Colors.white : Colors.black;
|
||||
final Color foregroundColor = foregroundBrightness == Brightness.dark
|
||||
? AppColors.textPrimary
|
||||
: AppColors.textOnAccent;
|
||||
|
||||
return ThemeData(
|
||||
useMaterial3: true,
|
||||
scaffoldBackgroundColor: const Color.fromRGBO(31, 32, 33, 1),
|
||||
scaffoldBackgroundColor: AppColors.scaffoldBackground,
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: seedColor,
|
||||
brightness: Brightness.dark,
|
||||
@@ -20,4 +22,4 @@ class AppTheme {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user