registerRoutes function Null safety

Map<String, WidgetBuilder> registerRoutes()

Map route to corresponding widget

Implementation

Map<String, WidgetBuilder> registerRoutes() {
  return <String, WidgetBuilder>{
    ROUTES.Home: (context) => AuthGuard(context, Home()),
    ROUTES.Register: (context) => RegisterScreen(),
    ROUTES.OnBoarding: (context) => OnBoardingScreen(),
    ROUTES.SignIn: (context) => SignInScreen(),
    ROUTES.Parkings: (BuildContext context) => AuthGuard(context, ParkingsScreen()),
    ROUTES.Profile: (BuildContext context) => AuthGuard(context,  ProfileScreen()),
    ROUTES.EditProfile: (BuildContext context) => AuthGuard(context,  EditProfileScreen()),
    ROUTES.Notifications: (BuildContext context) => AuthGuard(context,  NotificationsScreen()),
    ROUTES.MyCards: (BuildContext context) => AuthGuard(context,  MyCardsScreen()),
    ROUTES.ForgotPassword: (BuildContext context) => ForgotPasswordScreen(),
    ROUTES.ChangePassword: (BuildContext context) => ChangePasswordScreen(),
    ROUTES.CheckEmail: (BuildContext context) => CheckEmailScreen(),
    ROUTES.Settings: (BuildContext context) => AuthGuard(context, SettingsScreen()),
    ROUTES.ContactUs: (BuildContext context) => AuthGuard(context, ContactUsScreen()),
    ROUTES.Bookmarks: (BuildContext context) => AuthGuard(context, BookmarksScreen()),
    ROUTES.Reservations: (BuildContext context) => AuthGuard(context, BookingsScreen()),
  };
}