payfrit-app/lib/app/app_router.dart
John Mizerek 33f7128b40 feat: implement user authentication with login screen
- Add LoginScreen with form validation and error handling
- Add Api.login() method with LoginResponse model
- Add login route to AppRouter
- Update SplashScreen to check auth status and route to login if needed
- Store auth token in Api service for authenticated requests
- Fix restaurant selection to work with authenticated users
2025-12-29 10:01:35 -08:00

23 lines
864 B
Dart

import "package:flutter/material.dart";
import "../screens/login_screen.dart";
import "../screens/order_home_screen.dart";
import "../screens/restaurant_select_screen.dart";
import "../screens/service_point_select_screen.dart";
import "../screens/splash_screen.dart";
class AppRoutes {
static const String splash = "/";
static const String login = "/login";
static const String restaurantSelect = "/restaurants";
static const String servicePointSelect = "/service-points";
static const String orderHome = "/order";
static Map<String, WidgetBuilder> get routes => {
splash: (_) => const SplashScreen(),
login: (_) => const LoginScreen(),
restaurantSelect: (_) => const RestaurantSelectScreen(),
servicePointSelect: (_) => const ServicePointSelectScreen(),
orderHome: (_) => const OrderHomeScreen(),
};
}