Skip to content

Conversation

@nathannewyen
Copy link

Summary

  • Added explicit color: Colors.white to the default subtitle text rendering in all control widgets
  • Ensures subtitle text is always visible regardless of the app's theme configuration
  • Subtitles are rendered on a semi-transparent black background (Color(0x96000000)), so dark text colors can be invisible

Changes

  • lib/src/cupertino/cupertino_controls.dart - Added white color to subtitle TextStyle
  • lib/src/material/material_controls.dart - Added white color to subtitle TextStyle
  • lib/src/material/material_desktop_controls.dart - Added white color to subtitle TextStyle

Test plan

  • Tested with iOS/Cupertino controls - subtitles now visible
  • Tested with Material controls - subtitles remain visible
  • Verified fix applies only to default subtitle rendering (apps with custom subtitleBuilder are unaffected)

Addresses #914

🤖 Generated with Claude Code

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 fluttercommunity#914
@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.84%. Comparing base (d228479) to head (c12d5bf).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #934   +/-   ##
=======================================
  Coverage   43.84%   43.84%           
=======================================
  Files          21       21           
  Lines        1601     1601           
=======================================
  Hits          702      702           
  Misses        899      899           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant