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:
2026-11-11 05:05:57 +00:00
parent a2e6f8557e
commit a7c41063fa
26 changed files with 622 additions and 1353 deletions
@@ -11,7 +11,6 @@ import 'package:pipelines_app/features/settings/settings_store.dart';
import 'fake_channel.dart';
import 'settings_topic_test_helper.dart';
import 'package:pipelines_app/ui/adaptive/segmented_bar.dart';
void main() {
testWidgets('renders idle settings without opening a connection', (
@@ -258,23 +257,6 @@ void main() {
expect(find.byKey(SettingsKeys.connect), findsOneWidget);
});
testWidgets('an explicit Cupertino host uses Cupertino fields and buttons', (
tester,
) async {
final factory = FakeChannelFactory();
final client = transport.PipelinesClient(channelFactory: factory.call);
addTearDown(client.dispose);
await _pump(tester, client, cupertino: true);
expect(find.byType(SegmentedBar), findsOneWidget);
expect(find.byType(CupertinoTextField), findsNWidgets(2));
expect(find.byType(TextField), findsNothing);
expect(find.byType(FilledButton), findsNothing);
expect(find.byKey(SettingsKeys.connect), findsOneWidget);
expect(find.text('Trusted LAN/VPN only'), findsOneWidget);
});
testWidgets('narrow window with large text scrolls without overflow', (
tester,
) async {
@@ -375,26 +357,11 @@ Future<void> _pump(
transport.PipelinesClient client, {
SettingsStore? store,
TargetPlatform platform = TargetPlatform.android,
bool cupertino = false,
double textScale = 1,
Size size = const Size(800, 1200),
}) async {
await tester.binding.setSurfaceSize(size);
addTearDown(() => tester.binding.setSurfaceSize(null));
if (cupertino) {
await tester.pumpWidget(
CupertinoApp(
home: SettingsScreen(
client: client,
store: store ?? MemorySettingsStore(),
),
),
);
await tester.pump();
await tester.pump();
await selectSettingsTopic(tester, 'Connection');
return;
}
await tester.pumpWidget(
MaterialApp(
theme: ThemeData(platform: platform),