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,7 +1,5 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../ui/adaptive/host.dart';
|
||||
import '../updates/app_updates.dart';
|
||||
import 'server_connections.dart';
|
||||
|
||||
@@ -108,31 +106,14 @@ class _SettingsUpdatesSectionState extends State<SettingsUpdatesSection> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final cupertino = usesCupertinoHost(context);
|
||||
Widget button(
|
||||
Key key,
|
||||
String label,
|
||||
VoidCallback? onPressed,
|
||||
bool primary,
|
||||
) => cupertino
|
||||
? (primary
|
||||
? CupertinoButton.filled(
|
||||
key: key,
|
||||
onPressed: onPressed,
|
||||
child: Text(label),
|
||||
)
|
||||
: CupertinoButton(
|
||||
key: key,
|
||||
onPressed: onPressed,
|
||||
child: Text(label),
|
||||
))
|
||||
: (primary
|
||||
? FilledButton(key: key, onPressed: onPressed, child: Text(label))
|
||||
: OutlinedButton(
|
||||
key: key,
|
||||
onPressed: onPressed,
|
||||
child: Text(label),
|
||||
));
|
||||
) => primary
|
||||
? FilledButton(key: key, onPressed: onPressed, child: Text(label))
|
||||
: OutlinedButton(key: key, onPressed: onPressed, child: Text(label));
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
@@ -166,11 +147,7 @@ class _SettingsUpdatesSectionState extends State<SettingsUpdatesSection> {
|
||||
if (_progress != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: cupertino
|
||||
? CupertinoActivityIndicator.partiallyRevealed(
|
||||
progress: _progress!,
|
||||
)
|
||||
: LinearProgressIndicator(value: _progress),
|
||||
child: LinearProgressIndicator(value: _progress),
|
||||
),
|
||||
if (_message != null)
|
||||
Padding(
|
||||
|
||||
Reference in New Issue
Block a user