m
This commit is contained in:
@@ -2,8 +2,9 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flux/core/blocs/session/session_bloc.dart';
|
||||
import 'package:flux/features/auth/ui/auth_screen.dart';
|
||||
import 'package:flux/features/company/ui/create_company_screen.dart';
|
||||
import 'package:flux/features/dashboard/ui/dashboard_screen.dart';
|
||||
import 'package:flux/features/home/ui/dashboard_content.dart';
|
||||
import 'package:flux/features/store/ui/create_store_screen.dart';
|
||||
import 'package:flux/ui/home_screen.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'dart:async';
|
||||
|
||||
@@ -33,8 +34,9 @@ class AppRouter {
|
||||
|
||||
if (isUnauthenticated && location != '/login') return '/login';
|
||||
|
||||
if (isNoCompany && location != '/create-company')
|
||||
if (isNoCompany && location != '/create-company') {
|
||||
return '/create-company';
|
||||
}
|
||||
|
||||
if (isNoStore && location != '/create-store') return '/create-store';
|
||||
|
||||
@@ -44,10 +46,7 @@ class AppRouter {
|
||||
return null;
|
||||
},
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: '/',
|
||||
builder: (context, state) => const DashboardScreen(),
|
||||
),
|
||||
GoRoute(path: '/', builder: (context, state) => const HomeScreen()),
|
||||
GoRoute(
|
||||
path: '/login',
|
||||
builder: (context, state) => const AuthScreen(),
|
||||
|
||||
Reference in New Issue
Block a user