This commit is contained in:
2026-04-09 19:25:32 +02:00
parent bb631a5d43
commit e06f7329f0
3 changed files with 225 additions and 56 deletions

View File

@@ -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(),