Shuffle/app/lib/features/auth/presentation/auth_route_placeholder.dart
cschlaefke 54337ffc59 feat(auth): add auth domain, repository, validators and router redirects
Refs #1

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 00:09:47 +01:00

40 lines
1.3 KiB
Dart

import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:shuffle/core/routing/app_routes.dart';
/// Platzhalter für Auth-Seiten, bis A2 bis A4 die Screens liefern. Ohne
/// sichtbare Texte (keine hartkodierten UI-Strings).
class AuthRoutePlaceholder extends StatelessWidget {
const AuthRoutePlaceholder({required this.routeKey, super.key});
final String routeKey;
@override
Widget build(BuildContext context) =>
Scaffold(key: Key('auth_placeholder_$routeKey'), body: const SizedBox());
}
/// Routen der Auth-Seiten nach Spec #1 § 5.3. A2 bis A4 ersetzen die Builder.
final List<RouteBase> authRoutes = [
_placeholder(AppRoutes.login, 'login'),
GoRoute(
path: AppRoutes.register,
builder: (context, state) =>
const AuthRoutePlaceholder(routeKey: 'register'),
routes: [
GoRoute(
path: 'check-email',
builder: (context, state) =>
const AuthRoutePlaceholder(routeKey: 'check_email'),
),
],
),
_placeholder(AppRoutes.forgotPassword, 'forgot_password'),
_placeholder(AppRoutes.authConfirm, 'auth_confirm'),
_placeholder(AppRoutes.resetPassword, 'reset_password'),
];
GoRoute _placeholder(String path, String key) => GoRoute(
path: path,
builder: (context, state) => AuthRoutePlaceholder(routeKey: key),
);