feat(flutter): add auth module with router and screens
- Add app_router.dart with auth routes (login, register) - Update main.dart with MaterialApp.router - Add 5 auth screens: - LoginEmailScreen with email validation - LoginPasswordScreen with password visibility toggle - LoginCodeScreen with verification code input - RegisterScreen with step indicator - RegisterStep2Screen with password/code/invite inputs
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import '../../features/auth/ui/screens/login_email_screen.dart';
|
||||
import '../../features/auth/ui/screens/login_password_screen.dart';
|
||||
import '../../features/auth/ui/screens/login_code_screen.dart';
|
||||
import '../../features/auth/ui/screens/register_screen.dart';
|
||||
import '../../features/auth/ui/screens/register_step2_screen.dart';
|
||||
|
||||
final appRouter = GoRouter(
|
||||
initialLocation: '/',
|
||||
routes: [
|
||||
GoRoute(path: '/', builder: (context, state) => const LoginEmailScreen()),
|
||||
GoRoute(
|
||||
path: '/login/password',
|
||||
builder: (context, state) => const LoginPasswordScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/login/code',
|
||||
builder: (context, state) => const LoginCodeScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/register',
|
||||
builder: (context, state) => const RegisterScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/register/step2',
|
||||
builder: (context, state) => const RegisterStep2Screen(),
|
||||
),
|
||||
],
|
||||
);
|
||||
Reference in New Issue
Block a user