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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user