Refactor theme management: Replace AppColors with AppPalette
- Removed AppColors class and migrated all references to AppPalette. - Updated VaultAccessScreen, MenuDrawer, NoteCard, SearchAppBar, and other widgets to use AppPalette for color management. - Introduced AppPalette to handle light and dark themes with appropriate color schemes. - Adjusted theme application in AppTheme to utilize AppPalette extensions. - Updated tests to reflect changes in theme structure and color references.
This commit is contained in:
@@ -1,10 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:notas/theme/app_colors.dart';
|
||||
import 'package:notas/theme/app_palette.dart';
|
||||
|
||||
class CategoryStyle {
|
||||
CategoryStyle._();
|
||||
|
||||
static const List<Color> colors = AppColors.categoryColors;
|
||||
static const List<Color> colors = AppPalette.defaultCategoryColors;
|
||||
|
||||
static List<Color> colorsOf(BuildContext context) {
|
||||
final AppPalette? palette = Theme.of(context).extension<AppPalette>();
|
||||
if (palette != null) {
|
||||
return palette.categoryColors;
|
||||
}
|
||||
|
||||
return AppPalette.defaultCategoryColors;
|
||||
}
|
||||
|
||||
static const List<IconData> icons = <IconData>[
|
||||
Icons.label_outline_rounded,
|
||||
|
||||
Reference in New Issue
Block a user