passo_mobile_app/unit2/lib/utils/router.dart

37 lines
1.1 KiB
Dart
Raw Normal View History

2022-11-28 08:03:13 +00:00
import 'package:go_router/go_router.dart';
import '../screen/sos/add_mobile.dart';
import '../screen/sos/request_sos.dart';
2022-11-28 08:03:13 +00:00
import '../screen/unit2/login/login.dart';
import '../screen/unit2/homepage.dart/components/drawer-screen.dart';
import '../screen/unit2/profile/profile.dart';
2022-11-28 08:03:13 +00:00
final GoRouter goRouter = GoRouter(routes: <GoRoute>[
GoRoute(
path: '/',
name: 'login',
builder: (context, state) => const UniT2Login(),
routes: [
GoRoute(
name: 'home',
path: 'home',
builder: (context, state) => const DrawerScreen(),
routes: [
GoRoute(
name: 'profile',
path: 'profile',
builder: (context, state) => const Profile())
]),
GoRoute(
name: 'add-mobile',
path: 'add-moble',
builder: (context, state) => AddMobile(),
routes: [
GoRoute(
name: 'request-sos',
path: 'request-sos',
builder: (context, state) => const RequestSOS(),
)
]),
]),
]);