refactor: Migrate to Tweakcn themes and enhance UI consistency
- Replaced references to AppColorPalettes with TweakcnThemes across various files to standardize theme usage. - Updated the AppTheme and AppColorTokens to utilize TweakcnThemeDefinition for improved theme management. - Adjusted UI components in ChatPage, ChatsDrawer, AppCustomizationPage, and ProfilePage to align with the new theme structure, ensuring consistent styling and color application. - Removed the deprecated color_palettes.dart file to streamline the theme architecture.
This commit is contained in:
@@ -25,7 +25,7 @@ import '../services/optimized_storage_service.dart';
|
||||
import '../services/socket_service.dart';
|
||||
import '../utils/debug_logger.dart';
|
||||
import '../models/socket_event.dart';
|
||||
import '../../shared/theme/color_palettes.dart';
|
||||
import '../../shared/theme/tweakcn_themes.dart';
|
||||
import '../../shared/theme/app_theme.dart';
|
||||
import '../../features/tools/providers/tools_providers.dart';
|
||||
|
||||
@@ -88,14 +88,14 @@ class AppThemePalette extends _$AppThemePalette {
|
||||
late final OptimizedStorageService _storage;
|
||||
|
||||
@override
|
||||
AppColorPalette build() {
|
||||
TweakcnThemeDefinition build() {
|
||||
_storage = ref.watch(optimizedStorageServiceProvider);
|
||||
final storedId = _storage.getThemePaletteId();
|
||||
return AppColorPalettes.byId(storedId);
|
||||
return TweakcnThemes.byId(storedId);
|
||||
}
|
||||
|
||||
Future<void> setPalette(String paletteId) async {
|
||||
final palette = AppColorPalettes.byId(paletteId);
|
||||
final palette = TweakcnThemes.byId(paletteId);
|
||||
state = palette;
|
||||
await _storage.setThemePaletteId(palette.id);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'dart:math' as math;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/semantics.dart';
|
||||
import '../../shared/theme/color_palettes.dart';
|
||||
import '../../shared/theme/tweakcn_themes.dart';
|
||||
import '../../shared/theme/theme_extensions.dart';
|
||||
|
||||
/// Enhanced accessibility service for WCAG 2.2 AA compliance
|
||||
@@ -349,7 +349,7 @@ class EnhancedAccessibilityService {
|
||||
return BoxDecoration(
|
||||
border: hasFocus
|
||||
? Border.all(
|
||||
color: focusColor ?? AppColorPalettes.auroraViolet.light.primary,
|
||||
color: focusColor ?? TweakcnThemes.t3Chat.light.primary,
|
||||
width: borderWidth,
|
||||
)
|
||||
: null,
|
||||
|
||||
Reference in New Issue
Block a user