Remove Cupertino branches from Settings

Keep the Material-only settings implementation and its focused tests while preserving public cupertino parameters for later cleanup. This removes unreachable platform-specific widgets and test variants without changing the Material path.
This commit is contained in:
2026-11-11 05:05:57 +00:00
parent a2e6f8557e
commit a7c41063fa
26 changed files with 622 additions and 1353 deletions
@@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../ui/motion/quick_switch_animation.dart';
import '../chat/workspace/chat_workspace.dart';
@@ -51,7 +50,6 @@ class _QuickSwitchPreviewState extends State<QuickSwitchPreview> {
@override
Widget build(BuildContext context) {
final reduced = MediaQuery.disableAnimationsOf(context);
final cupertino = usesCupertinoControls(context);
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
@@ -60,16 +58,11 @@ class _QuickSwitchPreviewState extends State<QuickSwitchPreview> {
crossAxisAlignment: WrapCrossAlignment.center,
children: [
Text('Preview', style: settingsTextStyle(context, title: true)),
cupertino
? CupertinoButton(
onPressed: reduced ? null : _replay,
child: const Text('Replay animation'),
)
: TextButton.icon(
onPressed: reduced ? null : _replay,
icon: const Icon(Icons.replay),
label: const Text('Replay animation'),
),
TextButton.icon(
onPressed: reduced ? null : _replay,
icon: const Icon(Icons.replay),
label: const Text('Replay animation'),
),
],
),
Center(
@@ -120,16 +113,10 @@ class _PreviewChat extends StatelessWidget {
@override
Widget build(BuildContext context) {
final cupertino = usesCupertinoControls(context);
final color = cupertino
? (alternate ? CupertinoColors.systemTeal : CupertinoColors.systemBlue)
.resolveFrom(context)
: (alternate
? Theme.of(context).colorScheme.tertiary
: Theme.of(context).colorScheme.primary);
final background = cupertino
? CupertinoColors.secondarySystemGroupedBackground.resolveFrom(context)
: Theme.of(context).colorScheme.surfaceContainerHigh;
final color = alternate
? Theme.of(context).colorScheme.tertiary
: Theme.of(context).colorScheme.primary;
final background = Theme.of(context).colorScheme.surfaceContainerHigh;
return DecoratedBox(
decoration: BoxDecoration(
color: background,