- Decentralized Room Registry pattern - Each room registers itself with central registry - Dynamic navigation tabs and settings dropdown - New Media Room and Parlor feature folders - Permission-based room filtering support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
39 lines
1.1 KiB
Dart
39 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
import 'package:tatlock_ui/features/front_hall/presentation/pages/front_hall_page.dart';
|
|
import 'package:tatlock_ui/routing/app_router.dart';
|
|
import 'package:tatlock_ui/routing/room_registry.dart';
|
|
|
|
/// Route paths for Front Hall.
|
|
abstract class FrontHallRoutes {
|
|
static const base = '/front-hall';
|
|
}
|
|
|
|
/// Front Hall room definition.
|
|
final frontHallRoom = RoomDefinition(
|
|
id: 'front-hall',
|
|
label: 'Front Hall',
|
|
icon: Icons.door_front_door_outlined,
|
|
selectedIcon: Icons.door_front_door,
|
|
defaultRoute: FrontHallRoutes.base,
|
|
routes: frontHallRoutes,
|
|
// No permissions required - accessible to all authenticated users
|
|
);
|
|
|
|
/// Register Front Hall with the room registry.
|
|
void registerFrontHall() {
|
|
roomRegistry.register(frontHallRoom);
|
|
}
|
|
|
|
/// Front Hall routes for go_router.
|
|
List<RouteBase> frontHallRoutes() {
|
|
return [
|
|
GoRoute(
|
|
path: FrontHallRoutes.base,
|
|
name: 'frontHall',
|
|
pageBuilder: (context, state) =>
|
|
noTransitionPage(context, state, const FrontHallPage()),
|
|
),
|
|
];
|
|
}
|