Remove Cupertino UI branches from shared primitives

Keep the existing Material rendering, semantics, and interaction paths while removing obsolete Cupertino imports, alternate widgets, and dynamic-color dependencies. Record focused verification and remaining fixture limitations for final integration.
This commit is contained in:
2026-11-11 20:05:58 +00:00
parent 3f05421e8b
commit 5c80f75211
19 changed files with 78 additions and 210 deletions
+13 -11
View File
@@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
/// The shared status glyph whose tooltip and accessible name say the state.
@@ -21,7 +20,7 @@ class RunStatusIcon extends StatelessWidget {
@override
Widget build(BuildContext context) {
final color = runStatusColor(state).resolveFrom(context);
final color = runStatusColor(state, Theme.of(context).colorScheme);
return Tooltip(
message: label,
child: Semantics(
@@ -35,14 +34,17 @@ class RunStatusIcon extends StatelessWidget {
}
/// The dynamic colour for a run state, shared by every status glyph.
CupertinoDynamicColor runStatusColor(String state) => switch (state) {
'succeeded' => CupertinoColors.systemGreen,
'failed' => CupertinoColors.systemRed,
'running' || 'active' => CupertinoColors.systemBlue,
'waiting' => CupertinoColors.systemYellow,
'interrupted' => CupertinoColors.systemOrange,
_ => CupertinoColors.systemGrey,
};
Color runStatusColor(String state, [ColorScheme? colorScheme]) {
final scheme = colorScheme ?? const ColorScheme.light();
return switch (state) {
'succeeded' => scheme.tertiary,
'failed' => scheme.error,
'running' || 'active' => scheme.primary,
'waiting' => scheme.secondary,
'interrupted' => scheme.tertiary,
_ => scheme.onSurfaceVariant,
};
}
IconData _materialIcon(String state) => switch (state) {
'succeeded' => Icons.check_circle_outline,
@@ -65,7 +67,7 @@ class RunStatusKicker extends StatelessWidget {
@override
Widget build(BuildContext context) {
final color = runStatusColor(state).resolveFrom(context);
final color = runStatusColor(state, Theme.of(context).colorScheme);
return Row(
key: const Key('run-status-kicker'),
mainAxisSize: MainAxisSize.min,