Keep the Material-only status, text, and scale paths while preserving public signatures and the Cupertino colors still required by the status API.
2.9 KiB
Cupertino branches out of ui/status, ui/text and ui/scale
The app is Material-only, so the Cupertino sides of these shared widgets never ran. Removed them; the Material path is unchanged.
Changes
lib/ui/status/outcome_palette.dart:colorForalways readsTheme.of(context)(brightness andonSurfaceVariant) instead of choosing aCupertinoTheme/CupertinoColors.secondaryLabelbranch when there is noMaterialAppancestor. Dropped theflutter/cupertino.dartimport.lib/ui/status/run_status_icon.dart:RunStatusIconalways draws_materialIcon; removedusesCupertinoHost,_cupertinoIconand theui/adaptive/host.dartimport.lib/ui/text/markdown_source_view.dart:MarkdownModeSwitchalways uses the MaterialSegmentedButton; removed theCupertinoSlidingSegmentedControlbranch, thecupertino.dartimport and the host helper import.lib/ui/scale/ui_scale.dart: theUiScaleHostdoc comment names onlyMaterialApp.builder.
No public constructor or signature changed (runStatusColor, RunStatusIcon,
RunStatusKicker, MarkdownSourceView, MarkdownModeSwitch, OutcomePalette,
UiScaleHost stay as they were), so callers in other directories still compile.
Cupertino that stays (Material path uses it)
runStatusColorreturnsCupertinoDynamicColorand usesCupertinoColors(systemGreen,systemRed,systemBlue,systemYellow,systemOrange,systemGrey). Every caller outside these directories calls.resolveFrom(context), so the return type and the colour values must stay until the later run that removes the remaining Cupertino code.
No CupertinoIcons or Cupertino widgets remain under the three directories.
Checks
tool/memwatch/full.sh 'test/ui/status test/ui/text test/ui/scale ': PASS, 19 passed, 0 failed, 0 skipped.- Cross-directory users of the edited widgets:
test/features/runs/ui/run_timeline_row_test.dart,test/features/runs/ui/runs_list_widget_test.dart,test/features/runs/ui/run_cancel_wiring_test.dart,test/features/runs/ui/run_list_row_test.dart,test/features/attention/ui/needs_you_sheet_test.dart,test/features/graph/domain/run_graph_order_test.dart: PASS, 31 passed, 0 failed, 0 skipped. tool/analyze.sh: clean, exit 0 (31s).dart formaton the four edited files: 0 changed.
No Cupertino test variant in the matching test directories existed to delete.
The cross-directory for (final cupertino in [false, true]) loops host other
lanes' still-live Cupertino branches (AppListRow, RunsList, NeedsYouPage,
cancel dialogs); none asserts Cupertino-specific behaviour of the edited
widgets, so they were kept and pass on both hosts.
Affected UI states: run status glyphs and kicker (light/dark), outcome chips in
the run timeline, the run detail's kicker, the Rendered | Raw markdown switch,
and the UI-scale host. Material rendering is unchanged; ui-review captures
/runs in light and dark.