Skip to content

Commit c12d5bf

Browse files
author
nathannewyen
committed
fix: add explicit white color to default subtitle text
The default subtitle text in all control widgets (Cupertino, Material, and Material Desktop) did not specify an explicit text color. This could cause subtitles to be invisible on certain themes where the default text color is dark, as subtitles are rendered on a semi-transparent black background. This fix adds explicit `color: Colors.white` to ensure subtitle text is always visible regardless of the app's theme configuration. Addresses #914
1 parent 8b11166 commit c12d5bf

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

lib/src/cupertino/cupertino_controls.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,10 @@ class _CupertinoControlsState extends State<CupertinoControls>
222222
),
223223
child: Text(
224224
currentSubtitle.first!.text.toString(),
225-
style: const TextStyle(fontSize: 18),
225+
style: const TextStyle(
226+
fontSize: 18,
227+
color: Colors.white,
228+
),
226229
textAlign: TextAlign.center,
227230
),
228231
),

lib/src/material/material_controls.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,10 @@ class _MaterialControlsState extends State<MaterialControls>
234234
),
235235
child: Text(
236236
currentSubtitle.first!.text.toString(),
237-
style: const TextStyle(fontSize: 18),
237+
style: const TextStyle(
238+
fontSize: 18,
239+
color: Colors.white,
240+
),
238241
textAlign: TextAlign.center,
239242
),
240243
),

lib/src/material/material_desktop_controls.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,10 @@ class _MaterialDesktopControlsState extends State<MaterialDesktopControls>
247247
),
248248
child: Text(
249249
currentSubtitle.first!.text.toString(),
250-
style: const TextStyle(fontSize: 18),
250+
style: const TextStyle(
251+
fontSize: 18,
252+
color: Colors.white,
253+
),
251254
textAlign: TextAlign.center,
252255
),
253256
),

0 commit comments

Comments
 (0)