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:
@@ -18,7 +18,6 @@ class AdaptiveShell extends StatefulWidget {
|
||||
const AdaptiveShell({
|
||||
super.key,
|
||||
this.destinationBodies = const {},
|
||||
this.cupertino = false,
|
||||
this.destination,
|
||||
this.onDestinationSelected,
|
||||
this.onClosePage,
|
||||
@@ -37,9 +36,6 @@ class AdaptiveShell extends StatefulWidget {
|
||||
|
||||
final Map<AppDestination, WidgetBuilder> destinationBodies;
|
||||
|
||||
/// Retained for callers that still pass it; the shell always draws Material.
|
||||
final bool cupertino;
|
||||
|
||||
/// The destination a route owner selected. When null the shell keeps its own
|
||||
/// selection, which preserves the plain-shell tests and native composition.
|
||||
final AppDestination? destination;
|
||||
@@ -121,7 +117,6 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
|
||||
key: const ValueKey('shell.badge.chat.unread'),
|
||||
count: _bar.badge(destination, ShellBadgeKind.unread),
|
||||
label: 'unread chats',
|
||||
cupertino: false,
|
||||
child: icon,
|
||||
);
|
||||
}
|
||||
@@ -131,12 +126,10 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
|
||||
final attention = widget.attentionCount > 0;
|
||||
return AttentionDestinationIcon(
|
||||
count: widget.attentionCount,
|
||||
cupertino: false,
|
||||
child: ActivityBadge(
|
||||
key: const ValueKey('shell.badge.runs.running'),
|
||||
count: attention ? 0 : _bar.badge(destination, ShellBadgeKind.running),
|
||||
label: 'runs in progress',
|
||||
cupertino: false,
|
||||
child: icon,
|
||||
),
|
||||
);
|
||||
@@ -203,7 +196,6 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
|
||||
alignment: AlignmentDirectional.bottomStart,
|
||||
child: FloatingDestinationBar(
|
||||
showLabels: true,
|
||||
cupertino: false,
|
||||
currentIndex: index,
|
||||
onTap: (value) => _select(shellTabDestinations[value]),
|
||||
items: _destinationItems(),
|
||||
@@ -351,13 +343,11 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
|
||||
final published = spec?.actions ?? const <Widget>[];
|
||||
final onSearch = widget.onSearch;
|
||||
return SegmentedBar(
|
||||
cupertino: false,
|
||||
automaticallyImplyLeading: false,
|
||||
leading: onBack == null
|
||||
? null
|
||||
: SegmentedBackButton(
|
||||
key: const ValueKey('shell.back'),
|
||||
cupertino: false,
|
||||
onPressed: onBack,
|
||||
),
|
||||
title: spec?.title ?? label,
|
||||
|
||||
@@ -14,15 +14,11 @@ class AttentionDestinationIcon extends StatelessWidget {
|
||||
const AttentionDestinationIcon({
|
||||
super.key,
|
||||
required this.count,
|
||||
this.cupertino = false,
|
||||
required this.child,
|
||||
});
|
||||
|
||||
final int count;
|
||||
|
||||
/// Retained for callers that still pass it; the icon is always the Material
|
||||
/// [Badge] whether this is set or not.
|
||||
final bool cupertino;
|
||||
final Widget child;
|
||||
|
||||
@override
|
||||
@@ -55,7 +51,6 @@ class ActivityBadge extends StatelessWidget {
|
||||
super.key,
|
||||
required this.count,
|
||||
required this.label,
|
||||
this.cupertino = false,
|
||||
required this.child,
|
||||
this.bottom = false,
|
||||
});
|
||||
@@ -63,9 +58,6 @@ class ActivityBadge extends StatelessWidget {
|
||||
final int count;
|
||||
final String label;
|
||||
|
||||
/// Retained for callers that still pass it; the badge uses the Material
|
||||
/// theme colours whether this is set or not.
|
||||
final bool cupertino;
|
||||
final bool bottom;
|
||||
final Widget child;
|
||||
|
||||
|
||||
@@ -21,32 +21,17 @@ AppDestination shellTabFor(AppDestination destination) =>
|
||||
|
||||
/// The label and icons for [value].
|
||||
///
|
||||
({String label, IconData icon, IconData cupertinoIcon}) destinationDetails(
|
||||
AppDestination value,
|
||||
) => switch (value) {
|
||||
AppDestination.pipelines => (
|
||||
label: 'Pipelines',
|
||||
icon: Icons.account_tree_outlined,
|
||||
cupertinoIcon: Icons.account_tree_outlined,
|
||||
),
|
||||
AppDestination.runs => (
|
||||
label: 'Runs',
|
||||
icon: Icons.play_circle_outline,
|
||||
cupertinoIcon: Icons.play_circle_outline,
|
||||
),
|
||||
AppDestination.chat => (
|
||||
label: 'Chat',
|
||||
icon: Icons.chat_bubble_outline,
|
||||
cupertinoIcon: Icons.chat_bubble_outline,
|
||||
),
|
||||
AppDestination.search => (
|
||||
label: 'Search',
|
||||
icon: Icons.search,
|
||||
cupertinoIcon: Icons.search,
|
||||
),
|
||||
AppDestination.settings => (
|
||||
label: 'Settings',
|
||||
icon: Icons.settings_outlined,
|
||||
cupertinoIcon: Icons.settings_outlined,
|
||||
),
|
||||
};
|
||||
({String label, IconData icon}) destinationDetails(AppDestination value) =>
|
||||
switch (value) {
|
||||
AppDestination.pipelines => (
|
||||
label: 'Pipelines',
|
||||
icon: Icons.account_tree_outlined,
|
||||
),
|
||||
AppDestination.runs => (label: 'Runs', icon: Icons.play_circle_outline),
|
||||
AppDestination.chat => (label: 'Chat', icon: Icons.chat_bubble_outline),
|
||||
AppDestination.search => (label: 'Search', icon: Icons.search),
|
||||
AppDestination.settings => (
|
||||
label: 'Settings',
|
||||
icon: Icons.settings_outlined,
|
||||
),
|
||||
};
|
||||
|
||||
@@ -94,7 +94,6 @@ PageRoute<void> detailPageRoute(
|
||||
if (growFrom != null) {
|
||||
return ContainerTransformPageRoute<void>(
|
||||
link: growFrom,
|
||||
cupertino: false,
|
||||
builder: (_) => page,
|
||||
);
|
||||
}
|
||||
@@ -149,7 +148,6 @@ class _DetailPaneState extends State<DetailPane> {
|
||||
final bar = barless
|
||||
? null
|
||||
: SegmentedBar(
|
||||
cupertino: false,
|
||||
automaticallyImplyLeading: widget.implyBack,
|
||||
title: title,
|
||||
subtitle: spec?.subtitle,
|
||||
|
||||
@@ -5,14 +5,10 @@ import 'destination.dart';
|
||||
class ShellDestinationMenu extends StatelessWidget {
|
||||
const ShellDestinationMenu({
|
||||
super.key,
|
||||
required this.cupertino,
|
||||
required this.current,
|
||||
required this.onSelected,
|
||||
});
|
||||
|
||||
/// Retained for callers that still pass it; the menu is always the Material
|
||||
/// popup whether this is set or not.
|
||||
final bool cupertino;
|
||||
final AppDestination current;
|
||||
final ValueChanged<AppDestination> onSelected;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user