passo_mobile_app/unit2/lib/utils/router.dart

41 lines
1.3 KiB
Dart

import 'package:go_router/go_router.dart';
import 'package:unit2/screens/unit2/login/register.dart';
import '../screens/docsms/components/doc_info_tile.dart';
import '../screens/docsms/request_receipt.dart';
import '../screens/sos/add_mobile.dart';
import '../screens/sos/request_sos.dart';
import '../screens/unit2/login/login.dart';
import '../screens/unit2/homepage.dart/components/drawer-screen.dart';
import '../screens/unit2/profile/profile.dart';
import '../screens/unit2/roles/registration_in_charge/home.dart';
final GoRouter goRouter = GoRouter(routes: <GoRoute>[
GoRoute(
path: '/',
name: 'login',
builder: (context, state) => 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(),
)
]),
]),
]);