Files
pipelines/app/tool/fixture_host/fixture_host_web.dart
T
alan 69ae0519bd Remove Cupertino fixture alternatives
Keep capture and probe tooling on the app's single Material surface by removing obsolete platform switches, hosts, and documentation. Preserve the existing Material routes and fixture behavior while retaining compatibility APIs outside this lane.
2026-11-11 20:10:51 +00:00

37 lines
1.1 KiB
Dart

import 'package:flutter/widgets.dart';
import 'package:pipelines_app/application/server_endpoint.dart';
import 'package:web/web.dart' as web;
import '../perf/backdrop_census.dart';
import '../perf/chat_scroll_probe.dart';
import '../perf/frame_log.dart';
/// The fixture options: the page URL's query.
Map<String, String> fixtureParams() => Uri.base.queryParameters;
/// Installs the DevTools-facing probes the capture kit evaluates.
void installHostProbes(Map<String, String> params) {
installBackdropCensus();
installFrameLog(params);
installChatScrollProbe();
}
/// Moves the browser to [route] before the app reads its location.
void openFixtureRoute(String route) {
web.window.history.replaceState(
null,
'',
route,
);
}
/// The browser build's endpoint is its own page origin.
ServerEndpoint fixtureServer(Map<String, String> params) =>
ServerEndpoint.resolve(base: Uri.base, web: true);
/// The browser's location is the route; no provider is needed.
RouteInformationProvider? fixtureRouteProvider(String? route) => null;
/// Runs [app] unchanged.
void runFixtureApp(Widget app, Map<String, String> params) => runApp(app);