23 lines
603 B
Dart
23 lines
603 B
Dart
import 'package:go_router/go_router.dart';
|
|||
|
|
import '../../features/auth/presentation/views/login_view.dart';
|
||
|
|
import '../../features/dashboard/presentation/views/dashboard_view.dart';
|
||
|
|
|
||
|
|
class AppRouter {
|
||
|
|
static GoRouter getRouter([String initialLocation = '/login']) => GoRouter(
|
||
|
|
initialLocation: initialLocation,
|
||
|
|
routes: [
|
||
|
|
GoRoute(
|
||
|
|
path: '/login',
|
||
|
|
name: 'login',
|
||
|
|
builder: (context, state) => const LoginView(),
|
||
|
|
),
|
||
|
|
GoRoute(
|
||
|
|
path: '/',
|
||
|
|
name: 'dashboard',
|
||
|
|
builder: (context, state) => const DashboardView(),
|
||
|
|
),
|
||
|
|
],
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|