Complete Material-only APIs and fixtures

Remove obsolete control-family flags and icon metadata across all callers, dead alternate themes and host helpers, obsolete test setup, and the unused icon-font dependency. Preserve native Material Back transitions. Make navigation fixtures independent of update plugins and answer auxiliary shell snapshots so the complete application suite can run deterministically.
This commit is contained in:
2026-11-11 21:55:39 +00:00
parent 63b2fd12cd
commit 9551eceaed
222 changed files with 540 additions and 1351 deletions
-5
View File
@@ -14,7 +14,6 @@ class MyApp extends StatelessWidget {
const MyApp({
super.key,
this.destinationBodies = const {},
this.cupertino,
this.destination,
this.onDestinationSelected,
this.fonts,
@@ -26,7 +25,6 @@ class MyApp extends StatelessWidget {
const MyApp.router({
super.key,
required RouterConfig<Object> this.routerConfig,
this.cupertino,
this.fonts,
}) : destinationBodies = const {},
destination = null,
@@ -34,9 +32,6 @@ class MyApp extends StatelessWidget {
final Map<AppDestination, WidgetBuilder> destinationBodies;
/// Retained for source compatibility with older callers; Material is the
/// only application host.
final bool? cupertino;
final AppDestination? destination;
final ValueChanged<AppDestination>? onDestinationSelected;
final RouterConfig<Object>? routerConfig;
-5
View File
@@ -46,7 +46,6 @@ String routeLocation(Uri uri) {
class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
AppRouterDelegate({
required this.builder,
this.cupertino,
this.searchBuilder,
this.templatesBuilder,
this.schedulesBuilder,
@@ -74,10 +73,6 @@ class AppRouterDelegate extends RouterDelegate<AppRoute> with ChangeNotifier {
/// state and selection, and the standard navigation bar supplies Back.
final Widget Function(BuildContext context)? searchBuilder;
/// Retained for compatibility with older composition callers. Routes use
/// Material pages on every platform.
final bool? cupertino;
final _navigatorKey = GlobalKey<NavigatorState>();
static const _pageKey = ValueKey<String>('pipelines-shell');
static const _searchPageKey = ValueKey<String>('app-search');
+10 -16
View File
@@ -53,24 +53,18 @@ class AppTerminals {
/// app's floating [windows] above both.
/// [onChat]: the phone shortcut that reopens the terminal shows on the
/// Chat tab only.
Widget surround(
Widget shell, {
required bool cupertino,
bool onChat = true,
Widget? windows,
}) => TerminalSurface(
hub: hub,
layout: layout,
cupertino: cupertino,
shortcutHere: onChat,
windows: windows,
floating: floating,
child: shell,
);
Widget surround(Widget shell, {bool onChat = true, Widget? windows}) =>
TerminalSurface(
hub: hub,
layout: layout,
shortcutHere: onChat,
windows: windows,
floating: floating,
child: shell,
);
/// The bar button showing or hiding the terminal.
Widget toggle({required bool cupertino}) =>
TerminalToggleButton(layout: layout, cupertino: cupertino);
Widget toggle() => TerminalToggleButton(layout: layout);
void dispose() {
floating?.dispose();
+1 -4
View File
@@ -14,12 +14,10 @@ class ConnectionGate extends StatelessWidget {
super.key,
required this.session,
required this.server,
this.cupertino,
});
final AppSession session;
final ServerEndpoint server;
final bool? cupertino;
@override
Widget build(BuildContext context) {
@@ -105,10 +103,9 @@ class ConnectionGate extends StatelessWidget {
/// A compact status bar above retained content after the first connection.
class ConnectionBanner extends StatelessWidget {
const ConnectionBanner({super.key, required this.session, this.cupertino});
const ConnectionBanner({super.key, required this.session});
final AppSession session;
final bool? cupertino;
@override
Widget build(BuildContext context) {
+4 -18
View File
@@ -75,7 +75,6 @@ class PipelinesApp extends StatefulWidget {
super.key,
required this.server,
this.client,
this.cupertino,
this.routeInformationProvider,
this.knownServer = false,
this.serverAddresses,
@@ -108,7 +107,6 @@ class PipelinesApp extends StatefulWidget {
final WindowManager? windows;
final ServerEndpoint server;
final PipelinesClient? client;
final bool? cupertino;
/// Test seam: the Router's initial and subsequent route information.
final RouteInformationProvider? routeInformationProvider;
@@ -145,7 +143,6 @@ class _PipelinesAppState extends State<PipelinesApp>
late final RouteInformationProvider _provider;
late final bool _ownsProvider;
late final RouterConfig<AppRoute> _config;
late final bool _cupertino;
/// Advances when a template create is accepted. The Pipelines destination
/// uses it to re-read through its mounted controller; no row is inserted
@@ -337,8 +334,6 @@ class _PipelinesAppState extends State<PipelinesApp>
type: RouteInformationReportingType.neglect,
);
}
// Kept as a compatibility field on the widget; composition is Material-only.
_cupertino = false;
_notifications.onOpenRun = (id) {
if (mounted) _delegate.goTo(AppRoute.run(id));
};
@@ -355,7 +350,6 @@ class _PipelinesAppState extends State<PipelinesApp>
MachineElevation.defaultPrompt = _elevationPrompt;
_delegate = AppRouterDelegate(
initial: initial,
cupertino: _cupertino,
templatesBuilder: _buildTemplates,
schedulesBuilder: _buildSchedules,
builder: _buildShell,
@@ -445,7 +439,6 @@ class _PipelinesAppState extends State<PipelinesApp>
nativePlatform: update is AndroidLaunchUpdate
? update.update.platform
: '',
cupertino: _cupertino,
);
if (accepted != true || !mounted || !dialogContext.mounted) return;
if (!widget.webPlatform && endpoint != _session.endpoint) return;
@@ -457,16 +450,11 @@ class _PipelinesAppState extends State<PipelinesApp>
dialogContext,
(update as AndroidLaunchUpdate).update,
installer: widget.androidInstaller,
cupertino: _cupertino,
);
}
} catch (error) {
if (mounted && dialogContext.mounted) {
await showLaunchUpdateFailure(
dialogContext,
error,
cupertino: _cupertino,
);
await showLaunchUpdateFailure(dialogContext, error);
}
}
} catch (_) {
@@ -584,11 +572,11 @@ class _PipelinesAppState extends State<PipelinesApp>
@override
Widget build(BuildContext context) => widget.servers == null
? MyApp.router(cupertino: _cupertino, routerConfig: _config)
? MyApp.router(routerConfig: _config)
: ServerContext(
connections: widget.servers!,
serverId: widget.serverId,
child: MyApp.router(cupertino: _cupertino, routerConfig: _config),
child: MyApp.router(routerConfig: _config),
);
/// Open a result through the exact identity the hit records. An unresolvable
@@ -796,7 +784,6 @@ class _PipelinesAppState extends State<PipelinesApp>
valueListenable: _attentionCount,
builder: (context, count, _) => _terminals.surround(
_shellFor(route, count),
cupertino: _cupertino,
onChat: route.kind == AppRouteKind.chat,
windows: WindowHost(manager: _windows),
),
@@ -823,10 +810,9 @@ class _PipelinesAppState extends State<PipelinesApp>
// Shown on every tab while the app has floating windows.
WindowsMenuButton(manager: _windows),
if (_destinationOf(route.kind) == AppDestination.chat)
_terminals.toggle(cupertino: _cupertino),
_terminals.toggle(),
],
attentionCount: attentionCount,
cupertino: _cupertino,
destination: _destinationOf(route.kind),
onDestinationSelected: _selectDestination,
onClosePage: () => _delegate.goTo(
@@ -105,10 +105,8 @@ class _SchedulesDestinationState extends State<SchedulesDestination> {
final body = _body();
// The round Back closes the page; Refresh sits in the actions pill.
final bar = SegmentedBar(
cupertino: false,
leading: SegmentedBackButton(
key: schedulesPageBackKey,
cupertino: false,
onPressed: widget.onBack,
),
title: 'Schedules',
@@ -116,7 +114,6 @@ class _SchedulesDestinationState extends State<SchedulesDestination> {
if (widget.session.everConnected)
ScheduleRefreshAction(
controller: _controller,
cupertino: false,
onRefresh: () => unawaited(_controller.refresh()),
),
],
@@ -136,7 +133,6 @@ class _SchedulesDestinationState extends State<SchedulesDestination> {
controller: _controller,
searchController: _search,
scrollController: _scroll,
cupertino: false,
onOpen: (schedule) {
final id = schedule.pipelineId;
if (id != null) widget.onOpenPipeline(id);
+1 -1
View File
@@ -64,7 +64,7 @@ class _SearchPage extends StatelessWidget {
@override
Widget build(BuildContext context) => Scaffold(
extendBodyBehindAppBar: true,
appBar: const SegmentedBar(cupertino: false, title: 'Search'),
appBar: const SegmentedBar(title: 'Search'),
body: SafeArea(child: child),
);
}
+3 -14
View File
@@ -89,16 +89,13 @@ class _TemplatesDestinationState extends State<TemplatesDestination> {
final spec = _bar.specFor(AppDestination.settings);
final onDetailBack = spec?.onBack;
return SegmentedBar(
cupertino: false,
leading: onDetailBack != null
? SegmentedBackButton(
key: templateDetailBackKey,
cupertino: false,
onPressed: onDetailBack,
)
: SegmentedBackButton(
key: templatesPageBackKey,
cupertino: false,
onPressed: widget.onBack,
),
title: spec?.title ?? 'Templates',
@@ -111,19 +108,12 @@ class _TemplatesDestinationState extends State<TemplatesDestination> {
final session = widget.session;
if (!session.everConnected) {
return BelowTopBar(
child: ConnectionGate(
session: session,
server: widget.server,
cupertino: false,
),
child: ConnectionGate(session: session, server: widget.server),
);
}
// A connection banner stays below the bar; the gallery keeps its place.
return TopBarNotices(
notices: [
if (!session.connected)
ConnectionBanner(session: session, cupertino: false),
],
notices: [if (!session.connected) ConnectionBanner(session: session)],
child: TemplatesScreen(
gateway: session.gateway,
embedded: true,
@@ -142,8 +132,7 @@ class _BarSlot extends StatelessWidget implements PreferredSizeWidget {
final Widget child;
@override
Size get preferredSize =>
const SegmentedBar(cupertino: false, title: '').preferredSize;
Size get preferredSize => const SegmentedBar(title: '').preferredSize;
@override
Widget build(BuildContext context) => child;
@@ -243,7 +243,7 @@ class ArtifactIconAction extends StatelessWidget {
height: 18,
child: CircularProgressIndicator(strokeWidth: 2),
)
: Icon(icon, size: GlassBarMetrics.iconSize(false)),
: Icon(icon, size: GlassBarMetrics.iconSize()),
);
}
}
@@ -30,12 +30,9 @@ class ArtifactFullscreenScope extends InheritedWidget {
/// the shell's bars and list pane. A full-screen dialog route: its bar shows
/// the platform's Close, and the system back gesture leaves it.
///
/// [cupertino] is retained for callers that still pass it; the route is always
/// the Material one.
Route<void> artifactFullscreenRoute({
bool? cupertino,
required WidgetBuilder builder,
}) => MaterialPageRoute<void>(fullscreenDialog: true, builder: builder);
/// Uses the native Material fullscreen route.
Route<void> artifactFullscreenRoute({required WidgetBuilder builder}) =>
MaterialPageRoute<void>(fullscreenDialog: true, builder: builder);
/// The zoom factors Zoom in and Zoom out step through.
const List<double> artifactHtmlZoomSteps = [
@@ -41,7 +41,6 @@ mixin ArtifactFullscreenHost<T extends StatefulWidget> on State<T> {
if (_fullscreen != null) return;
htmlZoom.value = 1;
final route = artifactFullscreenRoute(
cupertino: false,
builder: (_) => ArtifactFullscreenScope(
htmlZoom: htmlZoom,
child: ListenableBuilder(
@@ -562,7 +562,6 @@ class _ArtifactGalleryPageState extends State<ArtifactGalleryPage> {
return Scaffold(
extendBodyBehindAppBar: true,
appBar: SegmentedBar(
cupertino: false,
title: artifactGalleryTitle,
actions: [_debugToggle(context)],
),
@@ -152,7 +152,7 @@ class _ArtifactThumbnailState extends State<ArtifactThumbnail>
Widget build(BuildContext context) {
super.build(context);
final icon = Icon(
artifactKindIcon(widget.artifact, cupertino: false),
artifactKindIcon(widget.artifact),
size: widget.iconSize,
color: Theme.of(context).colorScheme.onSurfaceVariant,
);
@@ -191,9 +191,8 @@ class _ArtifactThumbnailState extends State<ArtifactThumbnail>
/// The icon for an artifact's kind of file, when it has no thumbnail.
///
/// [cupertino] is retained for callers that still pass it; the icon is always
/// the Material glyph the app draws.
IconData artifactKindIcon(ArtifactRecord artifact, {required bool cupertino}) {
/// The Material glyph the app draws for this file kind.
IconData artifactKindIcon(ArtifactRecord artifact) {
final name = artifact.name.toLowerCase();
final format = artifactPreviewFormat(artifact.contentType, artifact.name);
if (name.endsWith('.zip') || name.endsWith('.tar') || name.endsWith('.gz')) {
@@ -59,7 +59,7 @@ class ArtifactViewerBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
final actions = _actions(resolved, onFullscreen);
final pagerMin = count > 1 ? 2 * GlassBarMetrics.controlExtent(false) : 0.0;
final pagerMin = count > 1 ? 2 * GlassBarMetrics.controlExtent() : 0.0;
final pager = ChevronPager(
index: index,
count: count,
@@ -82,7 +82,6 @@ class ArtifactViewerBar extends StatelessWidget {
alignment: AlignmentDirectional.centerStart,
heightFactor: 1,
child: GlassControlBar(
cupertino: false,
child: LayoutBuilder(
builder: (context, constraints) => Row(
key: const Key('artifact-viewer-actions'),
@@ -21,7 +21,6 @@ class ArtifactViewerScaffold extends StatelessWidget {
@override
Widget build(BuildContext context) {
final bar = SegmentedBar(
cupertino: false,
title: title,
subtitle: subtitle,
actions: actions,
@@ -30,7 +30,6 @@ class NotificationPermissionTile extends StatelessWidget {
required this.state,
this.asked = false,
this.onRequest,
this.cupertino,
});
final NotificationPermissionState state;
@@ -42,10 +41,6 @@ class NotificationPermissionTile extends StatelessWidget {
/// request would be possible.
final VoidCallback? onRequest;
/// Retained for callers that still pass it; the tile is the Material row
/// whether this is set or not.
final bool? cupertino;
@override
Widget build(BuildContext context) {
final view = notificationPermissionView(state, asked: asked);
@@ -245,9 +245,7 @@ class _ChangesViewerState extends State<ChangesViewer> {
),
child: Padding(
padding: const EdgeInsets.all(8),
child: IntrinsicWidth(
child: GlassControlBar(cupertino: false, child: pager),
),
child: IntrinsicWidth(child: GlassControlBar(child: pager)),
),
),
),
@@ -311,7 +311,7 @@ class _FileDiffPageState extends State<FileDiffPage> {
child: SafeArea(
top: false,
minimum: const EdgeInsets.all(8),
child: GlassControlBar(cupertino: false, child: pager),
child: GlassControlBar(child: pager),
),
),
child: viewer,
@@ -319,7 +319,7 @@ class _FileDiffPageState extends State<FileDiffPage> {
);
return Scaffold(
extendBodyBehindAppBar: true,
appBar: SegmentedBar(cupertino: false, title: name),
appBar: SegmentedBar(title: name),
body: body,
);
}
@@ -39,7 +39,6 @@ mixin _ChatScreenWorkspace on State<ChatScreen> {
ChatCompactSidebar(
navigation: navigation?.registry.canNavigate == true
? ShellDestinationMenu(
cupertino: false,
current: AppDestination.chat,
onSelected: navigation!.registry.navigateTo,
)
@@ -12,12 +12,10 @@ class ChatAccountUsageSection extends StatefulWidget {
const ChatAccountUsageSection({
super.key,
required this.usage,
required this.cupertino,
this.now = DateTime.now,
});
final ChatAccountUsage? usage;
final bool cupertino;
final DateTime Function() now;
@override
@@ -120,17 +120,13 @@ class ChatPaneActivity extends InheritedWidget {
/// through the ambient icon colour, and the chat's own bar controls through
/// [foregroundOf].
class ChatBarTintScope extends InheritedWidget {
ChatBarTintScope({
super.key,
required this.tint,
required bool cupertino,
required Widget child,
}) : super(
child: IconTheme.merge(
data: IconThemeData(color: tint.foreground),
child: child,
),
);
ChatBarTintScope({super.key, required this.tint, required Widget child})
: super(
child: IconTheme.merge(
data: IconThemeData(color: tint.foreground),
child: child,
),
);
final ChatBarTint tint;
@@ -8,38 +8,37 @@ import 'package:flutter/material.dart';
/// size and colour; everything still comes from the active Material theme, so
/// light, dark and text scaling follow the host.
///
/// The `cupertino` parameters are kept for existing callers; the app is
/// Material-only, so every helper returns its Material value.
TextStyle? chatCardTitleStyle(BuildContext context, bool cupertino) =>
/// All helpers use the shared Material theme roles.
TextStyle? chatCardTitleStyle(BuildContext context) =>
Theme.of(context).textTheme.titleMedium;
TextStyle? chatCardBodyStyle(BuildContext context, bool cupertino) =>
TextStyle? chatCardBodyStyle(BuildContext context) =>
Theme.of(context).textTheme.bodyMedium;
/// A field or recorded-answer label: `titleSmall`, so labels sit visibly
/// below the card title without reading as extra headings.
TextStyle? chatCardLabelStyle(BuildContext context, bool cupertino) =>
TextStyle? chatCardLabelStyle(BuildContext context) =>
Theme.of(context).textTheme.titleSmall;
/// Body text that supports a control, such as a field description.
TextStyle? chatCardSecondaryStyle(BuildContext context, bool cupertino) =>
(chatCardBodyStyle(context, cupertino) ?? const TextStyle()).copyWith(
color: chatCardSecondaryColor(context, cupertino),
TextStyle? chatCardSecondaryStyle(BuildContext context) =>
(chatCardBodyStyle(context) ?? const TextStyle()).copyWith(
color: chatCardSecondaryColor(context),
);
Color chatCardSecondaryColor(BuildContext context, bool cupertino) =>
Color chatCardSecondaryColor(BuildContext context) =>
Theme.of(context).colorScheme.onSurfaceVariant;
Color chatCardErrorColor(BuildContext context, bool cupertino) =>
Color chatCardErrorColor(BuildContext context) =>
Theme.of(context).colorScheme.error;
/// The amber risk hue: the host's warning role, never a bespoke palette.
Color chatCardWarningColor(BuildContext context, bool cupertino) =>
Color chatCardWarningColor(BuildContext context) =>
Theme.of(context).colorScheme.tertiary;
/// A quiet inset surface for resource blocks and risk panels.
Color chatCardFillColor(BuildContext context, bool cupertino) =>
Color chatCardFillColor(BuildContext context) =>
Theme.of(context).colorScheme.surfaceContainerHighest;
Color chatCardWarningFillColor(BuildContext context, bool cupertino) =>
Color chatCardWarningFillColor(BuildContext context) =>
Theme.of(context).colorScheme.tertiaryContainer;
@@ -979,7 +979,6 @@ class _ChatComposerBarState extends State<ChatComposerBar> {
shape: _pillShape,
child: GlassPill(
key: const Key('chat-composer-pill'),
cupertino: false,
shape: _pillShape,
// The end controls keep the same gap from the pill's sides as from
// its bottom (and its top while the field is one line).
@@ -20,7 +20,6 @@ class ChatDeliveryIndicator extends StatelessWidget {
const ChatDeliveryIndicator({
super.key,
required this.state,
required this.cupertino,
this.onRetry,
this.onEdit,
this.editLabel = 'Edit',
@@ -28,7 +27,6 @@ class ChatDeliveryIndicator extends StatelessWidget {
});
final ChatDelivery state;
final bool cupertino;
final VoidCallback? onRetry;
final VoidCallback? onEdit;
final String editLabel;
@@ -22,8 +22,7 @@ class ChatPermissionCard extends StatelessWidget {
final Future<void> Function(String decision) onDecision;
final String? error;
/// The card-style helpers keep their `cupertino` flag for existing callers;
/// the card is always Material, so every call passes `false`.
/// The card uses the shared Material card styles.
@override
Widget build(BuildContext context) => Card(
// Consecutive cards must read as separate surfaces; the row itself adds only
@@ -43,18 +42,15 @@ class ChatPermissionCard extends StatelessWidget {
padding: const EdgeInsetsDirectional.only(end: 12),
child: Icon(
Icons.shield_outlined,
color: chatCardWarningColor(context, false),
color: chatCardWarningColor(context),
),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(card.headline, style: chatCardTitleStyle(context, false)),
Text(
card.statusLine,
style: chatCardSecondaryStyle(context, false),
),
Text(card.headline, style: chatCardTitleStyle(context)),
Text(card.statusLine, style: chatCardSecondaryStyle(context)),
],
),
),
@@ -64,7 +60,7 @@ class ChatPermissionCard extends StatelessWidget {
const SizedBox(height: 12),
DecoratedBox(
decoration: BoxDecoration(
color: chatCardFillColor(context, false),
color: chatCardFillColor(context),
borderRadius: BorderRadius.circular(8),
),
child: Padding(
@@ -95,8 +91,7 @@ class ChatPermissionCard extends StatelessWidget {
error!,
style: chatCardBodyStyle(
context,
false,
)?.copyWith(color: chatCardErrorColor(context, false)),
)?.copyWith(color: chatCardErrorColor(context)),
),
),
],
@@ -105,10 +100,10 @@ class ChatPermissionCard extends StatelessWidget {
);
Widget _risk(BuildContext context) {
final tint = chatCardWarningColor(context, false);
final tint = chatCardWarningColor(context);
return DecoratedBox(
decoration: BoxDecoration(
color: chatCardWarningFillColor(context, false),
color: chatCardWarningFillColor(context),
borderRadius: BorderRadius.circular(8),
),
child: Padding(
@@ -123,16 +118,13 @@ class ChatPermissionCard extends StatelessWidget {
Expanded(
child: Text(
chatRiskReviewLabel,
style: chatCardLabelStyle(
context,
false,
)?.copyWith(color: tint),
style: chatCardLabelStyle(context)?.copyWith(color: tint),
),
),
],
),
const SizedBox(height: 4),
Text(card.risk, style: chatCardBodyStyle(context, false)),
Text(card.risk, style: chatCardBodyStyle(context)),
],
),
),
@@ -142,9 +142,9 @@ class _ChatQuestionCardState extends State<ChatQuestionCard> {
'${widget.form['title'] ?? ''}'.trim().isEmpty
? 'Question'
: '${widget.form['title']}'.trim(),
style: chatCardTitleStyle(context, false),
style: chatCardTitleStyle(context),
),
Text(_statusLine(), style: chatCardSecondaryStyle(context, false)),
Text(_statusLine(), style: chatCardSecondaryStyle(context)),
if (error.isNotEmpty)
Padding(
padding: const EdgeInsets.only(top: 8),
@@ -154,8 +154,7 @@ class _ChatQuestionCardState extends State<ChatQuestionCard> {
error,
style: chatCardBodyStyle(
context,
false,
)?.copyWith(color: chatCardErrorColor(context, false)),
)?.copyWith(color: chatCardErrorColor(context)),
),
),
),
@@ -164,21 +163,15 @@ class _ChatQuestionCardState extends State<ChatQuestionCard> {
context: context,
fields: _fields,
answers: _answers,
cupertino: false,
controllers: _controllers,
onChanged: _changed,
)
else
...chatQuestionRecordedAnswers(
context: context,
form: widget.form,
cupertino: false,
),
...chatQuestionRecordedAnswers(context: context, form: widget.form),
if (_pending) ...[
const SizedBox(height: 12),
chatQuestionControls(
context: context,
cupertino: false,
actions: actions,
submitLabel: _submitLabel,
sending: _sending,
@@ -4,11 +4,9 @@ import 'package:flutter/material.dart';
///
/// The web shows `Confirm completion` when every field is external, otherwise
/// `Send answer`, and offers only the actions the form records. The labels are
/// passed in so this file stays layout only. `cupertino` is kept for existing
/// callers; the controls are always Material.
/// passed in so this file stays layout only. Controls use Material widgets.
Widget chatQuestionControls({
required BuildContext context,
required bool cupertino,
required Object? actions,
required String submitLabel,
required bool sending,
@@ -16,7 +16,6 @@ List<Widget> chatQuestionFieldWidgets({
required BuildContext context,
required List<JsonMap> fields,
required Map<String, dynamic> answers,
required bool cupertino,
required Map<String, TextEditingController> controllers,
required void Function(String key, Object? value) onChanged,
}) {
@@ -31,7 +30,6 @@ List<Widget> chatQuestionFieldWidgets({
field: field,
keyName: key,
answers: answers,
cupertino: cupertino,
controllers: controllers,
onChanged: onChanged,
),
@@ -45,7 +43,6 @@ Widget _field({
required JsonMap field,
required String keyName,
required Map<String, dynamic> answers,
required bool cupertino,
required Map<String, TextEditingController> controllers,
required void Function(String key, Object? value) onChanged,
}) {
@@ -60,18 +57,17 @@ Widget _field({
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisSize: MainAxisSize.min,
children: [
Text(label, style: chatCardLabelStyle(context, cupertino)),
Text(label, style: chatCardLabelStyle(context)),
if (description.isNotEmpty && description != title)
Text(description, style: chatCardSecondaryStyle(context, cupertino)),
Text(description, style: chatCardSecondaryStyle(context)),
if ('${field['type'] ?? ''}' == 'external')
_external(context, field, cupertino)
_external(context, field)
else if ('${field['type'] ?? ''}' == 'boolean')
chatQuestionBooleanField(
context: context,
field: field,
keyName: keyName,
answers: answers,
cupertino: cupertino,
onChanged: onChanged,
)
else ...[
@@ -80,7 +76,6 @@ Widget _field({
field: field,
keyName: keyName,
answers: answers,
cupertino: cupertino,
onChanged: onChanged,
),
if (chatQuestionFieldNeedsInput(field))
@@ -139,15 +134,14 @@ Widget _input({
return Semantics(label: label, child: input);
}
Widget _external(BuildContext context, JsonMap field, bool cupertino) {
Widget _external(BuildContext context, JsonMap field) {
final raw = '${field['url'] ?? ''}'.trim();
if (!chatExternalUrlIsSafe(raw)) {
return Text(
'This form has an unsupported external URL.',
style: chatCardBodyStyle(
context,
cupertino,
)?.copyWith(color: chatCardErrorColor(context, cupertino)),
)?.copyWith(color: chatCardErrorColor(context)),
);
}
return SelectableText(raw);
@@ -178,17 +178,13 @@ class _QuestionSheet extends StatelessWidget {
children: [
Text(
title.isEmpty ? 'Question' : title,
style: chatCardTitleStyle(context, false),
style: chatCardTitleStyle(context),
),
Text(
chatQuestionSettledStatus(form),
style: chatCardSecondaryStyle(context, false),
),
...chatQuestionRecordedAnswers(
context: context,
form: form,
cupertino: false,
style: chatCardSecondaryStyle(context),
),
...chatQuestionRecordedAnswers(context: context, form: form),
],
),
),
@@ -11,7 +11,6 @@ Widget chatQuestionOptionsField({
required JsonMap field,
required String keyName,
required Map<String, dynamic> answers,
required bool cupertino,
required void Function(String key, Object? value) onChanged,
}) {
final options = chatQuestionOptions(field);
@@ -69,7 +68,6 @@ Widget chatQuestionBooleanField({
required JsonMap field,
required String keyName,
required Map<String, dynamic> answers,
required bool cupertino,
required void Function(String key, Object? value) onChanged,
}) {
final value = answers[keyName];
@@ -9,7 +9,6 @@ import 'chat_question_card_model.dart';
List<Widget> chatQuestionRecordedAnswers({
required BuildContext context,
required JsonMap form,
required bool cupertino,
}) {
final answers = form['answers'] is Map
? Map<String, dynamic>.from(form['answers'] as Map)
@@ -25,27 +24,18 @@ List<Widget> chatQuestionRecordedAnswers({
context,
chatQuestionFieldLabel(field, key),
chatQuestionAnswerText(field, answers[key]),
cupertino,
),
);
}
for (final entry in answers.entries) {
if (shown.contains(entry.key)) continue;
widgets.add(
_recorded(
context,
entry.key,
chatQuestionAnswerText(null, entry.value),
cupertino,
),
_recorded(context, entry.key, chatQuestionAnswerText(null, entry.value)),
);
}
if (widgets.isEmpty) {
return [
Text(
'No answer was recorded.',
style: chatCardSecondaryStyle(context, cupertino),
),
Text('No answer was recorded.', style: chatCardSecondaryStyle(context)),
];
}
return widgets;
@@ -61,19 +51,14 @@ String chatQuestionFieldLabel(JsonMap field, String key) {
return key;
}
Widget _recorded(
BuildContext context,
String label,
String value,
bool cupertino,
) => Padding(
Widget _recorded(BuildContext context, String label, String value) => Padding(
padding: const EdgeInsets.only(top: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(label, style: chatCardLabelStyle(context, cupertino)),
Text(value, style: chatCardBodyStyle(context, cupertino)),
Text(label, style: chatCardLabelStyle(context)),
Text(value, style: chatCardBodyStyle(context)),
],
),
);
@@ -12,18 +12,16 @@ import 'chat_export_controller.dart';
/// copy control, the harness and the working directory, the verified terminal
/// command that resumes the session, and the export actions.
///
/// `cupertino` is kept for existing callers; the section is always Material.
/// The section uses the shared Material surface.
class ChatSessionSection extends StatefulWidget {
const ChatSessionSection({
super.key,
required this.handoff,
required this.exporter,
required this.cupertino,
});
final ChatSessionHandoff handoff;
final ChatExportController exporter;
final bool cupertino;
@override
State<ChatSessionSection> createState() => _ChatSessionSectionState();
@@ -69,7 +69,6 @@ class ChatThreadHeader extends StatelessWidget {
if (action is! SegmentedOverflowable) action,
if (moreActions.whereType<SegmentedOverflowable>().isNotEmpty)
SegmentedMoreButton(
cupertino: false,
entries: [
for (final action
in moreActions.whereType<SegmentedOverflowable>())
@@ -78,7 +77,6 @@ class ChatThreadHeader extends StatelessWidget {
),
];
final Widget bar = SegmentedBar(
cupertino: false,
pillColor: tint?.fill,
foregroundColor: tint?.foreground,
automaticallyImplyLeading: false,
@@ -87,7 +85,6 @@ class ChatThreadHeader extends StatelessWidget {
leading: showBack
? SegmentedBackButton(
key: const Key('chat-back'),
cupertino: false,
onPressed: onBack,
)
: null,
@@ -131,7 +128,6 @@ class ChatThreadHeader extends StatelessWidget {
: ChatBarTintScope(
key: const Key('chat-bar-tint'),
tint: tint,
cupertino: false,
child: bar,
),
);
@@ -1608,11 +1608,7 @@ class _ChatThreadViewState extends State<ChatThreadView> {
footer: [
...chips,
if (delivery != null)
ChatDeliveryIndicator(
state: delivery,
cupertino: false,
onRemove: onRemove,
),
ChatDeliveryIndicator(state: delivery, onRemove: onRemove),
],
images: _images,
),
@@ -1650,7 +1646,6 @@ class _ChatThreadViewState extends State<ChatThreadView> {
footer: [
ChatDeliveryIndicator(
state: ChatDelivery.queued,
cupertino: false,
onRemove: _removeAction('${prompt['operation_id'] ?? ''}'),
),
],
@@ -1672,7 +1667,6 @@ class _ChatThreadViewState extends State<ChatThreadView> {
footer: [
ChatDeliveryIndicator(
state: ChatDelivery.failed,
cupertino: false,
onRetry: send.canRetry && !composer.sending
? () => unawaited(composer.retry(send.operationId))
: null,
@@ -1902,17 +1896,13 @@ class _ChatInfoSheet extends StatelessWidget {
children: [
AppSheetHeader(
title: 'Chat information',
cupertino: false,
doneKey: const Key('chat-info-close'),
),
if (onColorSelected case final onSelected?)
ChatColorSection(selected: color, onSelected: onSelected),
for (final metric in _chatInfoMetrics(controller.usage))
_ChatInfoRow(metric: metric),
ChatAccountUsageSection(
usage: controller.accountUsage,
cupertino: false,
),
ChatAccountUsageSection(usage: controller.accountUsage),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(24, 8, 24, 16),
child: Text(
@@ -1923,11 +1913,7 @@ class _ChatInfoSheet extends StatelessWidget {
),
),
),
ChatSessionSection(
handoff: handoff,
exporter: exporter,
cupertino: false,
),
ChatSessionSection(handoff: handoff, exporter: exporter),
const SizedBox(height: 12),
],
);
@@ -36,7 +36,7 @@ class ChatShellHistoryChip extends StatelessWidget {
);
}
Future<void> _open(BuildContext context, bool _) {
Future<void> _open(BuildContext context) {
// A dialog in the tiled app on a wide layout. A phone keeps the
// full-screen page, and a floating window opens it as a page of that
// window, so what it opens next (a diff, a command's output) stays in
@@ -98,7 +98,7 @@ class _ChatShellHistoryOutputPageState
if (snapshot.hasError) {
return Text(
"Couldn't read the output: ${snapshot.error}",
style: chatCardSecondaryStyle(context, false),
style: chatCardSecondaryStyle(context),
);
}
final full = snapshot.data;
@@ -134,10 +134,7 @@ class _ChatShellHistoryOutputPageState
children: [
ChatShellStatus(run: full),
if (full.directory.isNotEmpty)
Text(
full.directory,
style: chatCardSecondaryStyle(context, false),
),
Text(full.directory, style: chatCardSecondaryStyle(context)),
],
),
),
@@ -146,7 +143,7 @@ class _ChatShellHistoryOutputPageState
? Text(
'No output.',
key: const Key('chat-shell-output-empty'),
style: chatCardSecondaryStyle(context, false),
style: chatCardSecondaryStyle(context),
)
: ChatShellTerminalView(session: session, fill: true),
),
@@ -207,8 +204,7 @@ class _ChatShellHistoryOutputPageState
error,
style: chatCardSecondaryStyle(
context,
false,
)?.copyWith(color: chatCardErrorColor(context, false)),
)?.copyWith(color: chatCardErrorColor(context)),
),
),
],
@@ -76,7 +76,7 @@ class _ChatShellHistoryViewState extends State<ChatShellHistoryView> {
padding: const EdgeInsets.all(16),
child: Text(
'Every command here was restored to the transcript.',
style: chatCardSecondaryStyle(context, false),
style: chatCardSecondaryStyle(context),
),
),
for (final run in runs) _entry(context, run),
@@ -100,7 +100,7 @@ class _ChatShellHistoryViewState extends State<ChatShellHistoryView> {
}
Widget _entry(BuildContext context, ChatShellRun run) {
final secondary = chatCardSecondaryStyle(context, false);
final secondary = chatCardSecondaryStyle(context);
final refusal = _refusals[run.id];
final command = run.purged || run.command.isEmpty
? Text(chatShellCommandNotKept, style: secondary)
@@ -125,9 +125,7 @@ class _ChatShellHistoryViewState extends State<ChatShellHistoryView> {
Text(
refusal,
key: const Key('chat-shell-history-refusal'),
style: secondary?.copyWith(
color: chatCardErrorColor(context, false),
),
style: secondary?.copyWith(color: chatCardErrorColor(context)),
),
],
);
@@ -11,8 +11,10 @@ class ChatShellModeIndicator extends StatelessWidget {
@override
Widget build(BuildContext context) {
final accent = Theme.of(context).colorScheme.primary;
final label = (chatCardBodyStyle(context, false) ?? const TextStyle())
.copyWith(color: accent, fontWeight: FontWeight.w600);
final label = (chatCardBodyStyle(context) ?? const TextStyle()).copyWith(
color: accent,
fontWeight: FontWeight.w600,
);
return Semantics(
key: const Key('chat-composer-shell-mode'),
container: true,
@@ -40,10 +42,7 @@ class ChatShellModeIndicator extends StatelessWidget {
Text(chatShellModeLabel, style: label),
],
),
Text(
chatShellModeHint,
style: chatCardSecondaryStyle(context, false),
),
Text(chatShellModeHint, style: chatCardSecondaryStyle(context)),
],
),
),
@@ -34,7 +34,7 @@ class ChatShellOutputView extends StatelessWidget {
return Text(
'No output.',
key: const Key('chat-shell-output-empty'),
style: chatCardSecondaryStyle(context, false),
style: chatCardSecondaryStyle(context),
);
}
final session = controller.terminals.session(run);
@@ -77,8 +77,10 @@ class _ChatShellRunCardState extends State<ChatShellRunCard> {
Widget _body(BuildContext context, ChatShellRun run) {
final controller = widget.controller;
final error = controller.errorFor(run.id);
final command = (chatCardBodyStyle(context, false) ?? const TextStyle())
.copyWith(fontFamily: appMonospaceFamily, fontWeight: FontWeight.w600);
final command = (chatCardBodyStyle(context) ?? const TextStyle()).copyWith(
fontFamily: appMonospaceFamily,
fontWeight: FontWeight.w600,
);
return Column(
key: ValueKey<String>('chat-shell-run-${run.id}'),
mainAxisSize: MainAxisSize.min,
@@ -91,7 +93,7 @@ class _ChatShellRunCardState extends State<ChatShellRunCard> {
padding: const EdgeInsetsDirectional.only(end: 12),
child: Icon(
Icons.terminal,
color: chatCardSecondaryColor(context, false),
color: chatCardSecondaryColor(context),
),
),
Expanded(
@@ -104,10 +106,7 @@ class _ChatShellRunCardState extends State<ChatShellRunCard> {
style: command,
),
if (run.directory.isNotEmpty)
Text(
run.directory,
style: chatCardSecondaryStyle(context, false),
),
Text(run.directory, style: chatCardSecondaryStyle(context)),
],
),
),
@@ -132,10 +131,7 @@ class _ChatShellRunCardState extends State<ChatShellRunCard> {
if (run.error.isNotEmpty && !run.running)
Padding(
padding: const EdgeInsets.only(top: 8),
child: Text(
run.error,
style: chatCardSecondaryStyle(context, false),
),
child: Text(run.error, style: chatCardSecondaryStyle(context)),
),
const SizedBox(height: 4),
ChatShellCardActions(
@@ -149,8 +145,9 @@ class _ChatShellRunCardState extends State<ChatShellRunCard> {
child: Text(
error,
key: const Key('chat-shell-run-error'),
style: (chatCardBodyStyle(context, false) ?? const TextStyle())
.copyWith(color: chatCardErrorColor(context, false)),
style: (chatCardBodyStyle(context) ?? const TextStyle()).copyWith(
color: chatCardErrorColor(context),
),
),
),
],
@@ -30,8 +30,8 @@ class ChatShellStatus extends StatelessWidget {
: chatShellStatusLabel(run);
final color = switch (run.state) {
ChatShellRunState.succeeded => Theme.of(context).colorScheme.primary,
ChatShellRunState.failed => chatCardErrorColor(context, false),
_ => chatCardSecondaryColor(context, false),
ChatShellRunState.failed => chatCardErrorColor(context),
_ => chatCardSecondaryColor(context),
};
final icon = switch (run.state) {
ChatShellRunState.succeeded => Icons.check_circle_outline,
@@ -12,7 +12,7 @@ import '../conversation/chat_card_styles.dart';
/// darkened on a light surface so coloured output stays readable.
TerminalTheme chatShellTerminalTheme(BuildContext context) {
final dark = Theme.of(context).brightness == Brightness.dark;
final background = chatCardFillColor(context, false);
final background = chatCardFillColor(context);
final foreground = Theme.of(context).colorScheme.onSurface;
final accent = Theme.of(context).colorScheme.primary;
final base = TerminalThemes.defaultTheme;
@@ -55,7 +55,7 @@ TerminalTheme chatShellTerminalTheme(BuildContext context) {
/// The terminal's text: the host's monospace family at the card body size.
TerminalStyle chatShellTerminalStyle(BuildContext context) {
final body = chatCardBodyStyle(context, false) ?? const TextStyle();
final body = chatCardBodyStyle(context) ?? const TextStyle();
return TerminalStyle(
fontFamily: appMonospaceFamily,
fontSize: (body.fontSize ?? 14) * 0.95,
@@ -103,9 +103,8 @@ class _FolderPickerPageState extends State<FolderPickerPage> {
/// The app's segmented bar: Back (climbing one folder), the title, and
/// Cancel in the actions pill, each popping in like every other bar.
SegmentedBar _bar() => SegmentedBar(
cupertino: false,
automaticallyImplyLeading: false,
leading: SegmentedBackButton(cupertino: false, onPressed: _back),
leading: SegmentedBackButton(onPressed: _back),
title: widget.purpose.title,
actions: [
TextButton(
@@ -7,7 +7,6 @@ class ChatBarAction extends StatelessWidget implements SegmentedOverflowable {
required this.label,
required this.onPressed,
required this.materialIcon,
this.cupertinoIcon,
this.identifier,
});
@@ -15,10 +14,6 @@ class ChatBarAction extends StatelessWidget implements SegmentedOverflowable {
final VoidCallback onPressed;
final IconData materialIcon;
/// Compatibility for callers not yet migrated; Material always uses
/// [materialIcon].
final IconData? cupertinoIcon;
final String? identifier;
/// A narrow bar moves it into its More menu, under the bar's host's icon.
@@ -13,11 +13,10 @@ class ChatCompactAvatar extends StatelessWidget {
required this.running,
required this.backgroundTasks,
required this.unread,
required this.cupertino,
});
final String title;
final Color color;
final bool active, visible, running, unread, cupertino;
final bool active, visible, running, unread;
final int backgroundTasks;
@override
@@ -45,7 +44,6 @@ class ChatCompactAvatar extends StatelessWidget {
),
),
if (chatSessionActivityBadge(
cupertino: cupertino,
running: running,
backgroundTasks: backgroundTasks,
)
@@ -107,7 +107,6 @@ class ChatCompactSidebar extends StatelessWidget {
running: running,
backgroundTasks: backgroundTasks,
unread: unread,
cupertino: false,
),
if (machineName case final name?)
Text(
@@ -6,7 +6,6 @@ import 'chat_create_fields.dart';
class ChatPromptChooser extends StatelessWidget {
const ChatPromptChooser({
super.key,
required this.cupertino,
required this.enabled,
required this.choice,
required this.hasLastUsed,
@@ -18,8 +17,6 @@ class ChatPromptChooser extends StatelessWidget {
static const careful = 'careful';
static const lastUsed = 'last-used';
/// Kept for callers; the Material switch and picker are always drawn.
final bool cupertino;
final bool enabled;
final String choice;
final bool hasLastUsed;
@@ -417,11 +417,7 @@ class _ChatSessionsScreenState extends State<ChatSessionsScreen> {
return Scaffold(
extendBodyBehindAppBar: true,
appBar: SegmentedBar(
cupertino: false,
title: 'Chats',
actions: _actions(),
),
appBar: SegmentedBar(title: 'Chats', actions: _actions()),
// The list scrolls behind the floating bar; New chat is the bar's
// own action, so there is no second create button.
body: body,
@@ -335,7 +335,6 @@ class _CreateChatDialogState extends State<CreateChatDialog> {
),
const SizedBox(height: 12),
ChatPromptChooser(
cupertino: false,
enabled: _sendPrompt,
choice: _promptChoice,
hasLastUsed: _savedPrompt?.text.trim().isNotEmpty == true,
@@ -5,7 +5,6 @@ import 'package:flutter/material.dart';
/// background tasks still run, a quiet muted glyph (never a second spinner).
/// Null when the chat is idle.
Widget? chatSessionActivityBadge({
required bool cupertino,
required bool running,
required int backgroundTasks,
}) {
@@ -64,7 +64,7 @@ class ChatSessionRow extends StatelessWidget {
final accent = Theme.of(context).colorScheme.primary;
final shade = chatColorShade(context, chatSessionColor(session));
final marker = shade ?? accent;
final tint = AppListRow.tintFor(context, shade, cupertino: false);
final tint = AppListRow.tintFor(context, shade);
final background = Theme.of(context).scaffoldBackgroundColor;
// On a phone the chat's page grows out of this row and shrinks back
// into it; the surface it starts from is the row's tint over the list.
@@ -97,7 +97,6 @@ class ChatSessionRow extends StatelessWidget {
active: selected,
child: AppListRow(
key: Key('chat-row-$id'),
cupertino: false,
selected: selected,
selectedFill: Colors.transparent,
emphasized: unread,
@@ -236,7 +235,6 @@ class ChatSessionAvatar extends StatelessWidget {
foreground: mark,
background: fill,
badge: chatSessionActivityBadge(
cupertino: false,
running: running,
backgroundTasks: backgroundTasks,
),
@@ -18,13 +18,11 @@ class ChatAttachmentGallery extends StatelessWidget {
super.key,
required this.parts,
required this.images,
required this.cupertino,
});
/// File parts for which [chatPartIsThumbnail] holds.
final List<JsonMap> parts;
final ChatAttachmentImages images;
final bool cupertino;
@override
Widget build(BuildContext context) => Wrap(
@@ -39,7 +37,6 @@ class ChatAttachmentGallery extends StatelessWidget {
name: chatAttachmentPartName(part),
uri: '${part['uri'] ?? ''}'.trim(),
images: images,
cupertino: cupertino,
),
],
);
@@ -20,13 +20,11 @@ class ChatAttachmentThumbnail extends StatefulWidget {
required this.name,
required this.uri,
required this.images,
required this.cupertino,
});
final String name;
final String uri;
final ChatAttachmentImages images;
final bool cupertino;
@override
State<ChatAttachmentThumbnail> createState() =>
@@ -121,12 +119,8 @@ class _ChatAttachmentThumbnailState extends State<ChatAttachmentThumbnail> {
_placeholder(context, 'Image could not be read'),
),
);
void open() => openChatImageViewer(
context,
name: widget.name,
bytes: bytes,
cupertino: widget.cupertino,
);
void open() =>
openChatImageViewer(context, name: widget.name, bytes: bytes);
final constrained = ConstrainedBox(
constraints: const BoxConstraints(
maxWidth: chatThumbnailMaxWidth,
@@ -11,13 +11,7 @@ class ChatCodeHover {
Object? _active;
bool _disposed = false;
void show(
BuildContext context,
Object token,
String text,
Offset pointer, {
bool? cupertino,
}) {
void show(BuildContext context, Object token, String text, Offset pointer) {
if (_disposed) return;
hide();
final overlay = Overlay.maybeOf(context, rootOverlay: true);
@@ -128,12 +122,10 @@ class ChatCodeCopyRegion extends StatefulWidget {
const ChatCodeCopyRegion({
super.key,
required this.code,
this.cupertino,
required this.label,
required this.child,
});
final String code;
final bool? cupertino;
final Widget label, child;
@override
State<ChatCodeCopyRegion> createState() => _ChatCodeCopyRegionState();
@@ -9,16 +9,10 @@ const String chatImageViewerClose = 'Close';
/// One attached image full screen: pinch or scroll to zoom, drag to pan once
/// zoomed, and the host's own close control in the navigation bar.
class ChatImageViewer extends StatelessWidget {
const ChatImageViewer({
super.key,
required this.name,
required this.bytes,
required this.cupertino,
});
const ChatImageViewer({super.key, required this.name, required this.bytes});
final String name;
final Uint8List bytes;
final bool cupertino;
@override
Widget build(BuildContext context) {
@@ -45,7 +39,6 @@ class ChatImageViewer extends StatelessWidget {
extendBodyBehindAppBar: true,
backgroundColor: Colors.black,
appBar: SegmentedBar(
cupertino: false,
automaticallyImplyLeading: false,
leading: IconButton(
key: const Key('chat-image-viewer-close'),
@@ -68,9 +61,8 @@ Future<void> openChatImageViewer(
BuildContext context, {
required String name,
required Uint8List bytes,
required bool cupertino,
}) {
final page = ChatImageViewer(name: name, bytes: bytes, cupertino: cupertino);
final page = ChatImageViewer(name: name, bytes: bytes);
return Navigator.of(
context,
).push(MaterialPageRoute<void>(fullscreenDialog: true, builder: (_) => page));
@@ -116,7 +116,7 @@ class _ChatAgentReportCardState extends State<ChatAgentReportCard> {
? Padding(
padding: const EdgeInsetsDirectional.fromSTEB(12, 0, 12, 12),
child: DefaultTextStyle.merge(
style: chatMessageTextStyle(context, false),
style: chatMessageTextStyle(context),
child:
widget.textBuilder?.call(context, content.text) ??
SelectableText(content.text),
@@ -71,7 +71,7 @@ class ChatAgentSurface extends StatelessWidget {
/// The transcript's reading text: the host's large body role, so answers read
/// at a comfortable size and still follow the operator's text scaling.
TextStyle? chatMessageTextStyle(BuildContext context, [bool? cupertino]) =>
TextStyle? chatMessageTextStyle(BuildContext context) =>
Theme.of(context).textTheme.bodyLarge;
/// The empty-line gap between two paragraphs of a reply: about one line of
@@ -55,7 +55,7 @@ class ChatMessageView extends StatelessWidget {
// that shrinks to its content; the agent's answer sits on the page with no
// bubble, so long replies read as a document rather than a balloon.
final body = DefaultTextStyle.merge(
style: chatMessageTextStyle(context, false),
style: chatMessageTextStyle(context),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
@@ -127,7 +127,6 @@ class ChatMessageView extends StatelessWidget {
ChatAttachmentGallery(
parts: thumbnails,
images: images ?? _inlineImages,
cupertino: false,
),
if (thumbnails.isNotEmpty && content.isNotEmpty)
const SizedBox(height: 6),
@@ -284,7 +283,7 @@ class ChatMessageView extends StatelessWidget {
// empty line between consecutive ones keeps them reading as paragraphs.
final gap = chatParagraphGap(
context,
chatMessageTextStyle(context, false)?.fontSize,
chatMessageTextStyle(context)?.fontSize,
);
var previousText = false;
for (var index = 0; index < parts.length; index++) {
@@ -28,7 +28,7 @@ class ChatTurnChip extends StatelessWidget {
final Widget? sheet;
/// A custom presentation (a full-screen route on a narrow window).
final Future<void> Function(BuildContext context, bool cupertino)? open;
final Future<void> Function(BuildContext context)? open;
/// Shrink a long label to one ellipsized line. Only for a chip whose parent
/// bounds its width (a turn footer's Wrap, an aligned row).
@@ -91,7 +91,7 @@ class ChatTurnChip extends StatelessWidget {
}
Future<void> _open(BuildContext context) {
if (open case final open?) return open(context, false);
if (open case final open?) return open(context);
return showChatTurnSheet(context, sheet!);
}
}
@@ -55,8 +55,7 @@ class ChatTurnDiffChip extends StatelessWidget {
);
}
// The flag is unused: the Material presentation is the only one.
Future<void> _open(BuildContext context, bool cupertino) {
Future<void> _open(BuildContext context) {
// A dialog in the tiled app on a wide layout. A phone keeps the
// full-screen page, and a floating window opens it as a page of that
// window, so what it opens next (a diff, a command's output) stays in
@@ -46,7 +46,6 @@ class ChatShownHtmlCard extends StatelessWidget {
// The Material host: the route is a MaterialPageRoute whatever
// this flag says, so the flag is always false here.
artifactFullscreenRoute(
cupertino: false,
builder: (_) => ChatShownHtmlPage(
title: title,
html: html,
@@ -101,10 +101,9 @@ class _GraphExpandedViewState extends State<GraphExpandedView> {
return Scaffold(
extendBodyBehindAppBar: true,
appBar: SegmentedBar(
cupertino: false,
title: widget.title,
automaticallyImplyLeading: false,
leading: SegmentedBackButton(cupertino: false, onPressed: _close),
leading: SegmentedBackButton(onPressed: _close),
actions: [_GraphFitButton(onPressed: _controller.fitToViewport)],
),
body: BelowTopBar(child: body),
@@ -119,7 +119,6 @@ class _GraphViewportState extends State<GraphViewport> {
top: 8,
end: 8,
child: GlassPill(
cupertino: false,
child: Wrap(
spacing: 2,
children: [
@@ -161,7 +161,7 @@ Future<void> openStageDefinition(
settings: settings,
builder: (_) => Scaffold(
extendBodyBehindAppBar: true,
appBar: SegmentedBar(cupertino: false, title: title, subtitle: identity),
appBar: SegmentedBar(title: title, subtitle: identity),
body: SafeArea(top: false, bottom: false, child: view),
),
);
-1
View File
@@ -335,7 +335,6 @@ class _PipelinesScreenState extends State<PipelinesScreen> {
return Scaffold(
extendBodyBehindAppBar: true,
appBar: SegmentedBar(
cupertino: false,
title: 'Pipelines',
actions: [
...pipelineListActions(context, _controller),
@@ -266,7 +266,6 @@ class _RunPipelineDialogState extends State<_RunPipelineDialog> {
prompt: _prompt,
workspace: _workspace,
directories: _directories,
cupertino: false,
onChooseDirectory: _chooseDirectory,
notifyMode: _notify,
outputFormat: _outputFormat,
@@ -13,7 +13,6 @@ class RunPipelineFields extends StatelessWidget {
required this.prompt,
required this.workspace,
required this.directories,
required this.cupertino,
required this.onChooseDirectory,
required this.notifyMode,
required this.outputFormat,
@@ -26,9 +25,6 @@ class RunPipelineFields extends StatelessWidget {
final TextEditingController workspace;
final List<String> directories;
/// Retained for callers; the fields are Material on every host.
final bool cupertino;
final ValueChanged<String> onChooseDirectory;
final RunNotifyMode notifyMode;
final RunOutputFormat outputFormat;
@@ -10,8 +10,6 @@ Widget pipelineBarIconButton(
required Key key,
required String label,
required IconData icon,
// Compatibility for callers outside this lane; Material is always drawn.
IconData? cupertinoIcon,
required VoidCallback? onPressed,
}) {
return SegmentedOverflowAction(
@@ -49,10 +49,7 @@ class PipelineBackButton extends StatelessWidget {
Widget build(BuildContext context) {
return Semantics(
label: 'Back to pipelines',
child: SegmentedPill(
cupertino: false,
child: SegmentedBackButton(cupertino: false, onPressed: onPressed),
),
child: SegmentedPill(child: SegmentedBackButton(onPressed: onPressed)),
);
}
}
@@ -18,7 +18,6 @@ Future<void> openPipelineFilters(
initial: initial,
hasUnclassified: hasUnclassified,
onApply: onApply,
cupertino: false,
),
),
);
@@ -32,16 +31,12 @@ class PipelineFilterPage extends StatefulWidget {
required this.initial,
required this.hasUnclassified,
required this.onApply,
required this.cupertino,
});
final PipelineFilters initial;
final bool hasUnclassified;
final ValueChanged<PipelineFilters> onApply;
/// Retained for callers; the page is Material on every host.
final bool cupertino;
@override
State<PipelineFilterPage> createState() => _PipelineFilterPageState();
}
@@ -75,7 +70,6 @@ class _PipelineFilterPageState extends State<PipelineFilterPage> {
return Scaffold(
extendBodyBehindAppBar: true,
appBar: SegmentedBar(
cupertino: false,
title: 'Filter pipelines',
actions: [TextButton(onPressed: _apply, child: const Text('Done'))],
),
@@ -226,7 +226,6 @@ class PipelineListPanel extends StatelessWidget {
final badge = run == null ? null : runBadge(run, now);
return AppListRow(
key: Key('pipeline-row-${pipeline.id}'),
cupertino: false,
selected: controller.selectedId == pipeline.id,
divider: index < header.length + items.length - 1,
onTap: () =>
@@ -83,7 +83,6 @@ class PipelineSummaryView extends StatelessWidget {
if (fields.isEmpty) return const SizedBox.shrink();
return FactsGrid(
key: pipelineSummaryFactsKey,
cupertino: false,
items: [
for (final field in fields)
FactsGridItem(
@@ -106,7 +105,6 @@ class PipelineSummaryView extends StatelessWidget {
if (!showingLatest)
AppListRow(
key: const Key('pipeline-latest-version'),
cupertino: false,
title: Text('View latest v${detail.latestVersion}'),
subtitle: const Text('Return to the latest version'),
divider: versions.isNotEmpty,
@@ -115,7 +113,6 @@ class PipelineSummaryView extends StatelessWidget {
for (var index = 0; index < versions.length; index += 1)
AppListRow(
key: Key('pipeline-version-${versions[index].version}'),
cupertino: false,
selected: versions[index].version == effective,
title: Text('v${versions[index].version}'),
time: formatLocalTimestamp(versions[index].createdAt),
@@ -33,7 +33,6 @@ class PipelineDetailTabs extends StatelessWidget {
return KeyedSubtree(
key: const Key('pipeline-detail-tabs'),
child: FloatingDestinationBar(
cupertino: false,
currentIndex: tabs.indexOf(selected),
edge: edge,
onTap: (value) => onSelected(tabs[value]),
@@ -15,13 +15,9 @@ typedef CancelSubmit = Future<ActionRefusal?> Function();
Future<void> showCancelRunPrompt({
required BuildContext context,
required num runId,
required bool cupertino,
required CancelSubmit onSubmit,
}) {
final prompt = _CancelPrompt(
runId: runId,
onSubmit: onSubmit,
);
final prompt = _CancelPrompt(runId: runId, onSubmit: onSubmit);
return showDialog<void>(
context: context,
barrierDismissible: false,
@@ -43,7 +43,6 @@ class _CancelRunActionState extends State<CancelRunAction> {
await showCancelRunPrompt(
context: context,
runId: id,
cupertino: false,
onSubmit: () => _submit(id),
);
} finally {
@@ -22,17 +22,12 @@ class HumanDecisionAction extends StatefulWidget {
required this.run,
required this.gateway,
required this.onRunChanged,
this.cupertino,
});
final JsonMap run;
final ApiGateway gateway;
final ValueChanged<JsonMap> onRunChanged;
/// Retained for callers that still pass a host style; the Material prompt is
/// used everywhere now.
final bool? cupertino;
@override
State<HumanDecisionAction> createState() => _HumanDecisionActionState();
}
@@ -103,7 +98,6 @@ Future<void> showRunDecisionPrompt({
required JsonMap run,
required ApiGateway gateway,
required ValueChanged<JsonMap> onRunChanged,
bool? cupertino,
bool Function()? isCurrent,
}) async {
final decision = pendingDecision(run);
@@ -14,7 +14,6 @@ typedef DecisionSubmit = Future<ActionRefusal?> Function(DecisionDraft draft);
Future<void> showHumanDecisionPrompt({
required BuildContext context,
required PendingDecision decision,
bool? cupertino,
required DecisionSubmit onSubmit,
}) {
final prompt = _DecisionPrompt(decision: decision, onSubmit: onSubmit);
@@ -15,7 +15,6 @@ Future<bool> confirmDeleteRuns(
required Iterable<JsonMap> runs,
required ApiGateway gateway,
required ValueChanged<RunsDeletion> onDeleted,
bool? cupertino,
}) {
final deletable = runs.where(runIsDeletable).toList();
final ids = deletableRunIds(deletable);
@@ -24,7 +23,6 @@ Future<bool> confirmDeleteRuns(
context: context,
count: ids.length,
size: runsSizeLabel(deletable),
cupertino: cupertino ?? false,
onSubmit: () async {
try {
onDeleted(await RunsRepository(gateway).deleteRuns(ids));
@@ -18,10 +18,13 @@ Future<bool> showDeleteRunsPrompt({
required BuildContext context,
required int count,
required String? size,
required bool cupertino,
required DeleteRunsSubmit onSubmit,
}) async {
final prompt = _DeleteRunsPrompt(count: count, size: size, onSubmit: onSubmit);
final prompt = _DeleteRunsPrompt(
count: count,
size: size,
onSubmit: onSubmit,
);
final result = await showDialog<bool>(
context: context,
barrierDismissible: false,
@@ -72,10 +75,8 @@ class _DeleteRunsPromptState extends State<_DeleteRunsPrompt> {
}
@override
Widget build(BuildContext context) => PopScope(
canPop: !_sending,
child: _material(context),
);
Widget build(BuildContext context) =>
PopScope(canPop: !_sending, child: _material(context));
Widget _material(BuildContext context) {
final scheme = Theme.of(context).colorScheme;
@@ -106,7 +106,6 @@ Future<void> openRetryRunPrompt(
await showRetryRunPrompt(
context: context,
runId: id,
cupertino: false,
onSubmit: (intent) async {
try {
final updated = await repository.retryRun(
@@ -18,13 +18,9 @@ typedef RetrySubmit = Future<ActionRefusal?> Function(RetryIntent intent);
Future<void> showRetryRunPrompt({
required BuildContext context,
required num runId,
required bool cupertino,
required RetrySubmit onSubmit,
}) {
final prompt = _RetryPrompt(
runId: runId,
onSubmit: onSubmit,
);
final prompt = _RetryPrompt(runId: runId, onSubmit: onSubmit);
return showDialog<void>(
context: context,
barrierDismissible: false,
@@ -77,7 +77,6 @@ Future<void> openRunTitleEditor(
context: context,
runId: id,
initialTitle: storedRunTitle(run),
cupertino: false,
onSubmit: (title) async {
if (saving) return const ActionRefusal(actionAlreadySending);
saving = true;
@@ -19,7 +19,6 @@ Future<void> showRunTitlePrompt({
required BuildContext context,
required num runId,
required String initialTitle,
required bool cupertino,
required TitleSubmit onSubmit,
}) {
final prompt = _TitlePrompt(
@@ -144,7 +144,7 @@ class _MaterialChangesPage extends StatelessWidget {
@override
Widget build(BuildContext context) => Scaffold(
extendBodyBehindAppBar: true,
appBar: SegmentedBar(cupertino: false, title: title),
appBar: SegmentedBar(title: title),
body: ChangesViewer(steps: steps, showSummary: showSummary),
);
}
@@ -28,7 +28,6 @@ Widget buildMaterialRunDetail({
}) {
return RunDetailTabs(
run: run,
cupertino: false,
copying: copying,
copyStatus: copyStatus,
onCopy: onCopy,
@@ -23,7 +23,6 @@ import '../../../ui/adaptive/floating_bar_layout.dart';
Widget runDetailSummaryTab({
required BuildContext context,
required JsonMap run,
required bool cupertino,
required bool copying,
required String? copyStatus,
required VoidCallback onCopy,
@@ -101,22 +100,14 @@ Widget runDetailSummaryTab({
title: 'Input',
controller: inputController,
copyText: runFieldCopyText(run['input']),
body: RunFieldBody(
value: run['input'],
empty: visitEmptyInput,
cupertino: false,
),
body: RunFieldBody(value: run['input'], empty: visitEmptyInput),
),
_StickyField(
key: const ValueKey('run-detail-summary-output'),
title: 'Output',
controller: outputController,
copyText: runFieldCopyText(run['output']),
body: RunFieldBody(
value: run['output'],
empty: visitEmptyOutput,
cupertino: false,
),
body: RunFieldBody(value: run['output'], empty: visitEmptyOutput),
),
const SliverToBoxAdapter(child: SizedBox(height: 16)),
const SliverFloatingBarClearance(),
@@ -195,10 +186,9 @@ Widget runDetailFieldTab({
required String tabKey,
required dynamic value,
required String empty,
required bool cupertino,
}) {
// The recorded fields by name, as values, never raw JSON.
final body = RunFieldBody(value: value, empty: empty, cupertino: false);
final body = RunFieldBody(value: value, empty: empty);
// Flat on the page on both hosts, like the Summary.
return Builder(
builder: (context) => ListView(
@@ -46,7 +46,6 @@ class RunDetailTabStrip extends StatelessWidget {
return KeyedSubtree(
key: const Key('run-detail-tabs'),
child: FloatingDestinationBar(
cupertino: false,
currentIndex: index < 0 ? 0 : index,
edge: edge,
onTap: (value) => onSelected(tabs[value]),
+1 -15
View File
@@ -46,7 +46,6 @@ class RunDetailTabs extends StatefulWidget {
super.key,
required this.run,
required this.header,
required this.cupertino,
required this.copying,
required this.copyStatus,
required this.onCopy,
@@ -63,7 +62,6 @@ class RunDetailTabs extends StatefulWidget {
/// outside the tab body, so switching tabs never drops an action.
final Widget header;
final bool cupertino;
final bool copying;
final String? copyStatus;
final VoidCallback onCopy;
@@ -329,7 +327,6 @@ class _RunDetailTabsState extends State<RunDetailTabs> {
gateway: widget.gateway,
onRunChanged: widget.onRunChanged,
configuredEndpoint: widget.configuredEndpoint,
cupertino: false,
onClose: () => Navigator.of(pageContext).pop(),
)
: const Center(child: Text('This visit is no longer recorded.'));
@@ -337,10 +334,8 @@ class _RunDetailTabsState extends State<RunDetailTabs> {
// repeats neither; the sections scroll behind it.
final known = index < visits.length;
final bar = SegmentedBar(
cupertino: false,
leading: SegmentedBackButton(
key: const Key('run-visit-back'),
cupertino: false,
onPressed: () => Navigator.of(pageContext).pop(),
),
title: known ? visits[index].stage : detailTitle(run),
@@ -417,11 +412,7 @@ class _RunDetailTabsState extends State<RunDetailTabs> {
// strip) sits above the tab's content.
return FloatingBarOverlay(
edge: FloatingBarEdge.top,
bar: RunDetailWideChrome(
cupertino: false,
tabs: tabStrip,
header: header,
),
bar: RunDetailWideChrome(tabs: tabStrip, header: header),
child: body,
);
}
@@ -437,7 +428,6 @@ class _RunDetailTabsState extends State<RunDetailTabs> {
edge: FloatingBarEdge.top,
bar: TopGlassStrip(
key: const Key('run-detail-header'),
cupertino: false,
padding: const EdgeInsets.symmetric(vertical: 4),
child: header,
),
@@ -453,7 +443,6 @@ class _RunDetailTabsState extends State<RunDetailTabs> {
return runDetailSummaryTab(
context: context,
run: widget.run,
cupertino: false,
copying: widget.copying,
copyStatus: widget.copyStatus,
onCopy: widget.onCopy,
@@ -482,14 +471,12 @@ class _RunDetailTabsState extends State<RunDetailTabs> {
tabKey: 'input',
value: widget.run['input'],
empty: 'No input recorded.',
cupertino: false,
);
case RunDetailTab.output:
return runDetailFieldTab(
tabKey: 'output',
value: widget.run['output'],
empty: 'No output recorded.',
cupertino: false,
);
case RunDetailTab.artifacts:
return ArtifactGalleryPage(
@@ -520,7 +507,6 @@ class _RunDetailTabsState extends State<RunDetailTabs> {
selectedSequence: index != null && index >= 0 && index < visits.length
? visits[index].sequence
: null,
cupertino: false,
onSelected: _openVisit,
);
}
@@ -25,13 +25,11 @@ class RunTimelineList extends StatelessWidget {
const RunTimelineList({
super.key,
required this.visits,
required this.cupertino,
this.selectedSequence,
this.onSelected,
});
final List<DetailVisit> visits;
final bool cupertino;
final int? selectedSequence;
final ValueChanged<int>? onSelected;
@@ -61,7 +59,6 @@ class RunTimelineList extends StatelessWidget {
),
visit: visits[index],
selected: visits[index].sequence == selectedSequence,
cupertino: false,
divider: index < visits.length - 1,
palette: palette,
onTap: onSelected == null ? null : () => onSelected!(index),
@@ -79,7 +76,6 @@ class RunTimelineRow extends StatelessWidget {
super.key,
required this.visit,
required this.selected,
required this.cupertino,
this.divider = false,
this.onTap,
this.palette,
@@ -87,7 +83,6 @@ class RunTimelineRow extends StatelessWidget {
final DetailVisit visit;
final bool selected;
final bool cupertino;
final bool divider;
final VoidCallback? onTap;
@@ -140,7 +135,6 @@ class RunTimelineRow extends StatelessWidget {
// The outcome chip leads the second line, then where the visit went and
// the tokens it reported; the duration is the row's time.
return AppListRow(
cupertino: false,
selected: selected,
divider: divider,
onTap: onTap,
@@ -112,7 +112,6 @@ class _RunDetailViewState extends State<RunDetailView> {
run: run,
gateway: widget.gateway,
onRunChanged: widget.controller.acceptRunDetail,
cupertino: false,
onRunOpened: widget.onRunOpened,
onDeleted: widget.controller.applyDeletion,
);
@@ -132,10 +131,8 @@ class _RunDetailViewState extends State<RunDetailView> {
// On its own the run draws the same bar over its content.
return SegmentedBarOverlay(
bar: SegmentedBar(
cupertino: false,
leading: SegmentedBackButton(
key: const Key('run-detail-back'),
cupertino: false,
onPressed: widget.onBack,
),
title: title,
@@ -21,7 +21,6 @@ class RunVisitPane extends StatefulWidget {
required this.gateway,
required this.onRunChanged,
required this.configuredEndpoint,
required this.cupertino,
required this.onClose,
});
@@ -41,7 +40,6 @@ class RunVisitPane extends StatefulWidget {
final ValueChanged<JsonMap> onRunChanged;
final String configuredEndpoint;
final bool cupertino;
final VoidCallback onClose;
@override
@@ -88,7 +86,6 @@ class _RunVisitPaneState extends State<RunVisitPane> {
gateway: widget.gateway,
onRunChanged: widget.onRunChanged,
configuredEndpoint: widget.configuredEndpoint,
cupertino: false,
facts: RunVisitFactsView(step: widget.step),
),
],
@@ -53,7 +53,6 @@ class RunVisitSectionStrip extends StatelessWidget {
return KeyedSubtree(
key: const Key('run-visit-tabs'),
child: FloatingDestinationBar(
cupertino: false,
currentIndex: index < 0 ? 0 : index,
onTap: (value) => onSelected(shownVisitSections[value]),
items: [
@@ -97,7 +96,6 @@ Widget runVisitSectionBody({
required ApiGateway gateway,
required ValueChanged<JsonMap> onRunChanged,
required String configuredEndpoint,
required bool cupertino,
Widget? facts,
}) {
Widget body(RunVisitSection section) => runVisitSectionBody(
@@ -110,7 +108,6 @@ Widget runVisitSectionBody({
gateway: gateway,
onRunChanged: onRunChanged,
configuredEndpoint: configuredEndpoint,
cupertino: cupertino,
);
switch (section) {
case RunVisitSection.summary:
@@ -128,14 +125,12 @@ Widget runVisitSectionBody({
tabKey: 'visit-input',
value: step['input'],
empty: visitEmptyInput,
cupertino: cupertino,
);
case RunVisitSection.output:
return runDetailFieldTab(
tabKey: 'visit-output',
value: step['output'],
empty: visitEmptyOutput,
cupertino: cupertino,
);
case RunVisitSection.artifacts:
return RunVisitArtifacts(
@@ -212,7 +207,7 @@ class _VisitSummaryState extends State<_VisitSummary> {
trailing: [copy],
body: Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 16),
child: RunFieldBody(value: value, empty: empty, cupertino: false),
child: RunFieldBody(value: value, empty: empty),
),
);
}
@@ -24,13 +24,10 @@ const double kRunDetailWideTabsShare = 0.6;
class RunDetailWideChrome extends StatelessWidget {
const RunDetailWideChrome({
super.key,
required this.cupertino,
required this.tabs,
required this.header,
});
final bool cupertino;
/// The tab strip at [FloatingBarEdge.top]; it brings its own 12px margins.
final Widget tabs;
@@ -66,7 +63,6 @@ class RunDetailWideChrome extends StatelessWidget {
heightFactor: 1,
child: GlassPill(
key: const Key('run-detail-header'),
cupertino: false,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(kTopGlassStripRadius),
),
@@ -44,13 +44,11 @@ class RunFieldBody extends StatelessWidget {
super.key,
required this.value,
required this.empty,
required this.cupertino,
this.textBuilder,
});
final dynamic value;
final String empty;
final bool cupertino;
/// Draws a plain value; the host's selectable text by default.
final Widget Function(String text)? textBuilder;
@@ -108,7 +108,7 @@ class RunGraphPreview extends StatelessWidget {
MaterialPageRoute<void>(
builder: (page) => Scaffold(
extendBodyBehindAppBar: true,
appBar: const SegmentedBar(cupertino: false, title: 'Graph'),
appBar: const SegmentedBar(title: 'Graph'),
body: BelowTopBar(child: graphView(page)),
),
),
@@ -119,7 +119,6 @@ class RunListRow extends StatelessWidget {
final state = runStateOf(run['status']);
return AppListRow(
key: ValueKey('run-row-$id'),
cupertino: false,
selected: selected,
divider: divider,
onTap: selecting ? (runIsDeletable(run) ? onToggle : null) : onTap,
@@ -148,7 +147,6 @@ class RunListRow extends StatelessWidget {
onRunChanged: onRunChanged!,
onRunOpened: onRunOpened,
onDeleted: onDeleted,
cupertino: false,
menuKey: ValueKey('run-list-more-menu-$id'),
)
: null,
@@ -54,7 +54,6 @@ class RunMoreMenu extends StatefulWidget {
required this.run,
required this.gateway,
required this.onRunChanged,
required this.cupertino,
this.onRunOpened,
this.onDeleted,
this.menuKey = runMoreMenuKey,
@@ -63,7 +62,6 @@ class RunMoreMenu extends StatefulWidget {
final JsonMap run;
final ApiGateway gateway;
final ValueChanged<JsonMap> onRunChanged;
final bool cupertino;
/// Opens the new run an accepted retry names.
final ValueChanged<num>? onRunOpened;
@@ -118,7 +116,6 @@ class _RunMoreMenuState extends State<RunMoreMenu> {
runs: [run],
gateway: widget.gateway,
onDeleted: widget.onDeleted!,
cupertino: false,
);
}
}
@@ -17,15 +17,9 @@ int? runPipelineId(JsonMap run) {
/// The run's pipeline name, a link to that pipeline at the run's pinned
/// version when the run names one and the host can navigate.
class RunPipelineLink extends StatelessWidget {
const RunPipelineLink({
super.key,
required this.run,
required this.cupertino,
this.onOpenPipeline,
});
const RunPipelineLink({super.key, required this.run, this.onOpenPipeline});
final JsonMap run;
final bool cupertino;
final OpenPipeline? onOpenPipeline;
@override
@@ -59,7 +59,6 @@ Widget runsSelectAction(BuildContext context, RunsController controller) {
runs: selected,
gateway: controller.repository.gateway,
onDeleted: controller.applyDeletion,
cupertino: false,
);
final deleteLabel = count == 0
? 'Delete selected runs'
@@ -34,7 +34,7 @@ class RunsStatsPage extends StatelessWidget {
);
return Scaffold(
extendBodyBehindAppBar: true,
appBar: const SegmentedBar(cupertino: false, title: 'Usage'),
appBar: const SegmentedBar(title: 'Usage'),
body: SafeArea(top: false, bottom: false, child: body),
);
}

Some files were not shown because too many files have changed in this diff Show More