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.
38 lines
1.3 KiB
Dart
38 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
enum AppDestination { pipelines, runs, chat, search, settings }
|
|
|
|
/// The destinations the shell's tab bar offers, in order. Settings is a
|
|
/// destination the shell can show (its route is `/settings`), but it opens
|
|
/// as a page from the Pipelines bar's gear instead of being a tab.
|
|
const List<AppDestination> shellTabDestinations = [
|
|
AppDestination.pipelines,
|
|
AppDestination.runs,
|
|
AppDestination.chat,
|
|
AppDestination.search,
|
|
];
|
|
|
|
/// The tab that owns [destination] in the tab bar: itself, or Pipelines for
|
|
/// Settings (reached from the Pipelines bar).
|
|
AppDestination shellTabFor(AppDestination destination) =>
|
|
shellTabDestinations.contains(destination)
|
|
? destination
|
|
: AppDestination.pipelines;
|
|
|
|
/// The label and icons for [value].
|
|
///
|
|
({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,
|
|
),
|
|
};
|