refactor: enhance theme and error handling across the application
- Updated error handling in EnhancedErrorService to utilize context for color tokens, improving theme consistency. - Refactored various components to use context-aware shadow and color properties, enhancing visual coherence. - Replaced hardcoded color values with dynamic tokens in multiple widgets, ensuring better adaptability to theme changes. - Improved overall code maintainability by centralizing theme-related logic and reducing direct dependencies on static theme values.
This commit is contained in:
@@ -572,8 +572,12 @@ class FullScreenImageViewer extends ConsumerWidget {
|
||||
}
|
||||
}
|
||||
|
||||
final tokens = context.colorTokens;
|
||||
final background = tokens.neutralTone10;
|
||||
final iconColor = tokens.neutralOnSurface;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.black,
|
||||
backgroundColor: background,
|
||||
body: Stack(
|
||||
children: [
|
||||
Center(
|
||||
@@ -595,14 +599,14 @@ class FullScreenImageViewer extends ConsumerWidget {
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Platform.isIOS ? Icons.ios_share : Icons.share_outlined,
|
||||
color: Colors.white,
|
||||
color: iconColor,
|
||||
size: 26,
|
||||
),
|
||||
onPressed: () => _shareImage(context, ref),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.close, color: Colors.white, size: 28),
|
||||
icon: Icon(Icons.close, color: iconColor, size: 28),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user