Files
pipelines/app/lib/shell/destination.dart
T
alan 95902e3e49 Make Settings a first-class destination
Keep Settings location, selection, history, and persistence separate from Pipelines so /settings restores and navigates independently. Update focused navigation coverage and defer notification loading to avoid a mid-build Runs-tab update.
2026-11-12 11:12:49 +00:00

33 lines
1.2 KiB
Dart

import 'package:flutter/material.dart';
enum AppDestination { pipelines, runs, chat, search, settings }
/// The destinations the floating tab bar (or, on a wide window, the rail's
/// tabs) offers, in order. Settings is a destination of its own, not a tab of
/// Pipelines: it is selected alone, from the rail's foot on a wide window or as
/// the phone bar's last item, and no tab in this list is highlighted while it
/// is shown.
const List<AppDestination> shellTabDestinations = [
AppDestination.pipelines,
AppDestination.runs,
AppDestination.chat,
AppDestination.search,
];
/// 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,
),
};