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,10 +1,6 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'settings_layout.dart';
|
||||
import 'settings_theme.dart';
|
||||
import 'settings_page_body.dart';
|
||||
import 'settings_topic_store.dart';
|
||||
import '../../core/storage/ordered_local_storage.dart';
|
||||
import '../../ui/motion/surface_visibility.dart';
|
||||
@@ -133,37 +129,13 @@ class _SettingsTopicTabsState extends State<SettingsTopicTabs>
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final tabs = usesCupertinoControls(context)
|
||||
? SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: settingsPageSidePadding,
|
||||
),
|
||||
child: CupertinoSlidingSegmentedControl<SettingsTopic>(
|
||||
groupValue: _selected,
|
||||
children: {
|
||||
for (final topic in SettingsTopic.values)
|
||||
topic: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: settingsControlGap,
|
||||
),
|
||||
child: Text(topic.label),
|
||||
),
|
||||
},
|
||||
onValueChanged: (topic) {
|
||||
if (topic != null) _tabs.index = topic.index;
|
||||
},
|
||||
),
|
||||
)
|
||||
: TabBar(
|
||||
controller: _tabs,
|
||||
isScrollable: true,
|
||||
tabAlignment: TabAlignment.start,
|
||||
tabs: [
|
||||
for (final topic in SettingsTopic.values) Tab(text: topic.label),
|
||||
],
|
||||
);
|
||||
final body = SafeArea(
|
||||
final tabs = TabBar(
|
||||
controller: _tabs,
|
||||
isScrollable: true,
|
||||
tabAlignment: TabAlignment.start,
|
||||
tabs: [for (final topic in SettingsTopic.values) Tab(text: topic.label)],
|
||||
);
|
||||
return SafeArea(
|
||||
bottom: false,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
@@ -194,11 +166,5 @@ class _SettingsTopicTabsState extends State<SettingsTopicTabs>
|
||||
],
|
||||
),
|
||||
);
|
||||
return usesCupertinoControls(context)
|
||||
? ColoredBox(
|
||||
color: settingsCupertinoBackground.resolveFrom(context),
|
||||
child: body,
|
||||
)
|
||||
: body;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user