first commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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(),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user