Skip to content

Commit 540d7a3

Browse files
committed
refactor(widget): use theme-aware styles for content limitation bottom sheet
- Replace hardcoded colors and font sizes with theme-provided values - Use Theme.of(context) to obtain current theme data - Apply textTheme and colorScheme for consistent styling - Improve accessibility and adaptability to different theme settings
1 parent 9fa045e commit 540d7a3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/shared/widgets/content_limitation_bottom_sheet.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,24 +135,24 @@ class _BaseLimitView extends StatelessWidget {
135135

136136
@override
137137
Widget build(BuildContext context) {
138+
final theme = Theme.of(context);
139+
final textTheme = theme.textTheme;
140+
final colorScheme = theme.colorScheme;
141+
138142
return Padding(
139143
padding: const EdgeInsets.all(AppSpacing.paddingLarge),
140144
child: Column(
141145
mainAxisSize: MainAxisSize.min,
142146
children: [
143-
Icon(icon, size: AppSpacing.xxl * 1.5, color: Colors.blue),
147+
Icon(icon, size: AppSpacing.xxl * 1.5, color: colorScheme.primary),
144148
const SizedBox(height: AppSpacing.lg),
145149
Text(
146150
title,
147-
style: const TextStyle(fontSize: 22),
151+
style: textTheme.headlineSmall,
148152
textAlign: TextAlign.center,
149153
),
150154
const SizedBox(height: AppSpacing.md),
151-
Text(
152-
body,
153-
style: const TextStyle(fontSize: 16),
154-
textAlign: TextAlign.center,
155-
),
155+
Text(body, style: textTheme.bodyLarge, textAlign: TextAlign.center),
156156
const SizedBox(height: AppSpacing.lg),
157157
child,
158158
],

0 commit comments

Comments
 (0)