Remove Cupertino UI branches

Keep the Material-only status, text, and scale paths while preserving public signatures and the Cupertino colors still required by the status API.
This commit is contained in:
2026-11-11 01:00:35 +00:00
parent c2b992542b
commit 3ca1bf4a00
5 changed files with 75 additions and 52 deletions
+10 -20
View File
@@ -1,8 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../features/chat/ui/transcript/chat_markdown_view.dart';
import '../adaptive/host.dart';
/// Authored markdown (a pipeline's source, a stage's prompt) shown rendered,
/// with a switch to the raw text.
@@ -51,23 +49,15 @@ class MarkdownModeSwitch extends StatelessWidget {
@override
Widget build(BuildContext context) {
final cupertino = usesCupertinoHost(context);
return cupertino
? CupertinoSlidingSegmentedControl<bool>(
key: const Key('markdown-source-mode'),
groupValue: raw,
onValueChanged: (value) => onChanged(value ?? false),
children: const {false: Text('Rendered'), true: Text('Raw')},
)
: SegmentedButton<bool>(
key: const Key('markdown-source-mode'),
showSelectedIcon: false,
segments: const [
ButtonSegment(value: false, label: Text('Rendered')),
ButtonSegment(value: true, label: Text('Raw')),
],
selected: {raw},
onSelectionChanged: (value) => onChanged(value.single),
);
return SegmentedButton<bool>(
key: const Key('markdown-source-mode'),
showSelectedIcon: false,
segments: const [
ButtonSegment(value: false, label: Text('Rendered')),
ButtonSegment(value: true, label: Text('Raw')),
],
selected: {raw},
onSelectionChanged: (value) => onChanged(value.single),
);
}
}