9551eceaed
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.
36 lines
1.0 KiB
Dart
36 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'destination.dart';
|
|
|
|
/// Native, labeled destination access when the full tab bar cannot fit a rail.
|
|
class ShellDestinationMenu extends StatelessWidget {
|
|
const ShellDestinationMenu({
|
|
super.key,
|
|
required this.current,
|
|
required this.onSelected,
|
|
});
|
|
|
|
final AppDestination current;
|
|
final ValueChanged<AppDestination> onSelected;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final child = Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: const [Icon(Icons.apps), Text('Menu')],
|
|
);
|
|
return PopupMenuButton<AppDestination>(
|
|
tooltip: 'Main navigation',
|
|
onSelected: onSelected,
|
|
itemBuilder: (context) => [
|
|
for (final destination in AppDestination.values)
|
|
CheckedPopupMenuItem(
|
|
value: destination,
|
|
checked: destination == current,
|
|
child: Text(destinationDetails(destination).label),
|
|
),
|
|
],
|
|
child: Padding(padding: const EdgeInsets.all(8), child: child),
|
|
);
|
|
}
|
|
}
|