Remove Cupertino settings branches

Keep the Material settings implementation while preserving public Cupertino parameters for later cleanup. Narrow settings tests to the Material-only behavior.
This commit is contained in:
2026-11-11 05:21:30 +00:00
parent 75fd194394
commit 3933ff980c
18 changed files with 191 additions and 503 deletions
@@ -1,6 +1,5 @@
import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../ui/scale/ui_scale.dart';
@@ -34,7 +33,6 @@ class _SettingsScaleSectionState extends State<SettingsScaleSection> {
Widget build(BuildContext context) => ListenableBuilder(
listenable: _controller,
builder: (context, _) {
final cupertino = usesCupertinoControls(context);
final value = _draft ?? _controller.scale;
final label = '${value.toStringAsFixed(1)}×';
final reset = _controller.scale == 1 && _draft == null
@@ -70,41 +68,23 @@ class _SettingsScaleSectionState extends State<SettingsScaleSection> {
crossAxisAlignment: WrapCrossAlignment.center,
children: [
Text(label, style: settingsTextStyle(context, title: true)),
cupertino
? CupertinoButton(
onPressed: reset,
child: const Text('Reset'),
)
: TextButton(
onPressed: reset,
child: const Text('Reset'),
),
TextButton(onPressed: reset, child: const Text('Reset')),
],
),
Semantics(
label: 'Interface size',
child: cupertino
? CupertinoSlider(
key: const Key('settings-ui-scale'),
value: value,
min: minUiScale,
max: maxUiScale,
divisions: 15,
onChanged: drag,
onChangeEnd: _apply,
)
: Slider(
key: const Key('settings-ui-scale'),
value: value,
min: minUiScale,
max: maxUiScale,
divisions: 15,
label: label,
semanticFormatterCallback: (v) =>
'${v.toStringAsFixed(1)} times',
onChanged: drag,
onChangeEnd: _apply,
),
child: Slider(
key: const Key('settings-ui-scale'),
value: value,
min: minUiScale,
max: maxUiScale,
divisions: 15,
label: label,
semanticFormatterCallback: (v) =>
'${v.toStringAsFixed(1)} times',
onChanged: drag,
onChangeEnd: _apply,
),
),
const Wrap(
alignment: WrapAlignment.spaceBetween,