Remove alternate hosts from tooling probes
Keep the probe suite on the Material composition so browser fixtures and capture drivers no longer render or select Cupertino hosts. Record the final residual legacy arguments and implementation checks for the delivery gate.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import 'dart:js_interop';
|
||||
import 'dart:js_interop_unsafe';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:pipelines_app/core/api_gateway.dart';
|
||||
@@ -69,7 +68,6 @@ class _ProbeApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final params = Uri.base.queryParameters;
|
||||
final cupertino = params['host'] == 'cupertino';
|
||||
final scale = double.tryParse(params['scale'] ?? '') ?? 1;
|
||||
Widget scaled(BuildContext context, Widget? app) => MediaQuery(
|
||||
data: MediaQuery.of(
|
||||
@@ -77,24 +75,16 @@ class _ProbeApp extends StatelessWidget {
|
||||
).copyWith(textScaler: TextScaler.linear(scale)),
|
||||
child: app!,
|
||||
);
|
||||
if (cupertino) {
|
||||
return CupertinoApp(
|
||||
builder: scaled,
|
||||
home: const _ProbeHome(cupertino: true),
|
||||
);
|
||||
}
|
||||
return MaterialApp(
|
||||
theme: ThemeData(platform: TargetPlatform.android),
|
||||
builder: scaled,
|
||||
home: const _ProbeHome(cupertino: false),
|
||||
home: const _ProbeHome(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _ProbeHome extends StatefulWidget {
|
||||
const _ProbeHome({required this.cupertino});
|
||||
|
||||
final bool cupertino;
|
||||
const _ProbeHome();
|
||||
|
||||
@override
|
||||
State<_ProbeHome> createState() => _ProbeHomeState();
|
||||
@@ -130,7 +120,7 @@ class _ProbeHomeState extends State<_ProbeHome> {
|
||||
context: context,
|
||||
template: _template,
|
||||
repository: TemplateRepository(_gateway),
|
||||
cupertino: widget.cupertino,
|
||||
cupertino: false,
|
||||
onCreated: (detail) {
|
||||
_gateway.created.add(detail);
|
||||
_publish();
|
||||
@@ -140,27 +130,6 @@ class _ProbeHomeState extends State<_ProbeHome> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (widget.cupertino) {
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: const CupertinoNavigationBar(
|
||||
middle: Text('Template create probe'),
|
||||
),
|
||||
// One bounded, scrollable column keeps the opener reachable at 2x text,
|
||||
// where a long button label is wider than a phone viewport.
|
||||
child: Center(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(24),
|
||||
child: CupertinoButton.filled(
|
||||
onPressed: _open,
|
||||
child: const Text(
|
||||
'Create pipeline from this template',
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('Template create probe')),
|
||||
body: Center(
|
||||
|
||||
Reference in New Issue
Block a user