Files
pipelines/app/tool/pipeline_graph_tab_probe.dart
alan 13a5e1dee0 Remove Cupertino branches from probe fixtures
Keep the chat and graph fixtures aligned with the app's Material-only UI by removing alternate Cupertino hosts, imports, and query-controlled rendering paths. Preserve the existing Material scenarios and document the focused probe coverage.
2026-11-11 20:08:06 +00:00

57 lines
1.6 KiB
Dart

import 'package:flutter/material.dart';
import 'package:pipelines_app/features/pipelines/screen.dart';
import 'pipelines_probe_fixture.dart';
/// Browser fixture for the pipeline detail's real Graph tab.
///
/// `dark=1` selects the dark theme and `scale=2` a real 2x text scale. The screen, its list, detail, Graph tab and
/// definition pane are the same widgets the app registers; only the replies
/// come from the in-memory fixture.
void main() {
final parameters = Uri.base.queryParameters;
runApp(
_PipelineGraphTabProbe(
dark: parameters['dark'] == '1',
scale: double.tryParse(parameters['scale'] ?? '') ?? 1,
),
);
}
class _PipelineGraphTabProbe extends StatelessWidget {
const _PipelineGraphTabProbe({required this.dark, required this.scale});
final bool dark;
final double scale;
@override
Widget build(BuildContext context) {
Widget scaled(BuildContext context, Widget? child) => MediaQuery(
data: MediaQuery.of(
context,
).copyWith(textScaler: TextScaler.linear(scale)),
child: child ?? const SizedBox.shrink(),
);
final screen = PipelinesScreen(
gateway: PipelinesProbeGateway(),
embedded: true,
);
return MaterialApp(
title: 'Pipeline graph fixture',
debugShowCheckedModeBanner: false,
theme: ThemeData(
platform: TargetPlatform.android,
brightness: Brightness.light,
),
darkTheme: ThemeData(
platform: TargetPlatform.android,
brightness: Brightness.dark,
),
themeMode: dark ? ThemeMode.dark : ThemeMode.light,
builder: scaled,
home: Scaffold(body: SafeArea(child: screen)),
);
}
}