edc503b228
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.
20 lines
596 B
Dart
20 lines
596 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// 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,
|
|
Brightness brightness = Brightness.light,
|
|
}) {
|
|
return MaterialApp(
|
|
theme: ThemeData(brightness: brightness),
|
|
builder: (context, app) => MediaQuery(
|
|
data: MediaQuery.of(context).copyWith(textScaler: scaler),
|
|
child: app!,
|
|
),
|
|
home: Scaffold(body: child),
|
|
);
|
|
}
|