Remove Cupertino changes branches

Keep the Material-only changes feature while preserving public Cupertino parameters for callers. Remove Cupertino-only widgets, imports, hosts, and tests because the app never reaches that path.
This commit is contained in:
2026-11-11 16:22:09 +00:00
parent 4b4628f35c
commit edc503b228
11 changed files with 122 additions and 514 deletions
+3 -25
View File
@@ -1,9 +1,8 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
/// The two platform hosts the Changes widget tests share: Material for
/// Android/desktop/web and Cupertino for iOS/macOS. They state the platform
/// explicitly instead of mutating a global debug override.
/// The host the Changes widget tests share. The app is Material-only on every
/// platform, so the tests state the host explicitly instead of mutating a
/// global debug override.
Widget materialHost(
Widget child, {
TextScaler scaler = TextScaler.noScaling,
@@ -18,24 +17,3 @@ Widget materialHost(
home: Scaffold(body: child),
);
}
Widget cupertinoHost(
Widget child, {
TextScaler scaler = TextScaler.noScaling,
Brightness brightness = Brightness.light,
}) {
return CupertinoApp(
theme: CupertinoThemeData(brightness: brightness),
builder: (context, app) => Theme(
// The real app selects Cupertino by platform; the test host states it
// explicitly without changing a global debug override. The Theme wraps
// the Navigator so dialogs opened later resolve the same platform.
data: ThemeData(platform: TargetPlatform.iOS),
child: MediaQuery(
data: MediaQuery.of(context).copyWith(textScaler: scaler),
child: app!,
),
),
home: CupertinoPageScaffold(child: SafeArea(child: child)),
);
}