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