- 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.0 KiB
Dart
39 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
import 'package:tatlock_ui/features/parlor/presentation/pages/parlor_page.dart';
|
|
import 'package:tatlock_ui/routing/app_router.dart';
|
|
import 'package:tatlock_ui/routing/room_registry.dart';
|
|
|
|
/// Route paths for Parlor.
|
|
abstract class ParlorRoutes {
|
|
static const base = '/parlor';
|
|
}
|
|
|
|
/// Parlor room definition.
|
|
final parlorRoom = RoomDefinition(
|
|
id: 'parlor',
|
|
label: 'Parlor',
|
|
icon: Icons.lightbulb_outline,
|
|
selectedIcon: Icons.lightbulb,
|
|
defaultRoute: ParlorRoutes.base,
|
|
routes: parlorRoutes,
|
|
// No permissions required - accessible to all authenticated users
|
|
);
|
|
|
|
/// Register Parlor with the room registry.
|
|
void registerParlor() {
|
|
roomRegistry.register(parlorRoom);
|
|
}
|
|
|
|
/// Parlor routes for go_router.
|
|
List<RouteBase> parlorRoutes() {
|
|
return [
|
|
GoRoute(
|
|
path: ParlorRoutes.base,
|
|
name: 'parlor',
|
|
pageBuilder: (context, state) =>
|
|
noTransitionPage(context, state, const ParlorPage()),
|
|
),
|
|
];
|
|
}
|