18 lines
824 B
Dart
18 lines
824 B
Dart
/// Route path constants — the single source of truth so screens and the
|
|||
|
|
/// nav rail never hand-type a path string more than once.
|
||
|
|
abstract final class RoutePaths {
|
||
|
|
static const dashboard = '/dashboard';
|
||
|
|
static const services = '/services';
|
||
|
|
static const backups = '/backups';
|
||
|
|
static const fleet = '/fleet';
|
||
|
|
static const updates = '/updates';
|
||
|
|
static const settings = '/settings';
|
||
|
|
|
||
|
|
/// The service id is a query parameter (`?id=`), not a path segment.
|
||
|
|
/// `/services` and `/services?id=x` are the *same* go_router route, so
|
||
|
|
/// switching between them updates the existing page in place — no page
|
||
|
|
/// transition — which is what makes the slide-over panel read as an
|
||
|
|
/// overlay on the list rather than a navigation to a new screen.
|
||
|
|
static String serviceDetail(String id) => '/services?id=$id';
|
||
|
|
}
|