pennellato git da rosso ad arancio e verde
This commit is contained in:
@@ -51,7 +51,7 @@ class SessionCubit extends Cubit<SessionState> {
|
||||
}
|
||||
|
||||
// 2. Controllo Negozi
|
||||
final stores = await _repository.getStoresByCompanyId(company.id);
|
||||
final stores = await _repository.getStoresByCompanyId(company.id!);
|
||||
if (stores.isEmpty) {
|
||||
return emit(
|
||||
state.copyWith(
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flux/features/auth/ui/auth_screen.dart';
|
||||
import 'package:flux/features/customers/models/customer_model.dart';
|
||||
import 'package:flux/features/customers/ui/customer_detail_screen.dart';
|
||||
import 'package:flux/features/home/ui/home_screen.dart';
|
||||
import 'package:flux/features/master_data/products/ui/products_screen.dart';
|
||||
import 'package:flux/features/onboarding/ui/onboarding_screen.dart';
|
||||
import 'package:flux/features/services/models/service_model.dart';
|
||||
import 'package:flux/features/services/ui/service_form_screen/service_form_screen.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
@@ -58,7 +61,8 @@ class AppRouter {
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: '/login',
|
||||
builder: (context, state) => const LoginScreen(),
|
||||
//builder: (context, state) => const LoginScreen(),
|
||||
builder: (context, state) => const AuthScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/onboarding',
|
||||
@@ -69,7 +73,7 @@ class AppRouter {
|
||||
),
|
||||
GoRoute(
|
||||
path: '/',
|
||||
builder: (context, state) => const DashboardScreen(), // La tua home
|
||||
builder: (context, state) => const HomeScreen(), // La tua home
|
||||
),
|
||||
GoRoute(
|
||||
path: '/customer/:id',
|
||||
|
||||
6
lib/core/utils/validators.dart
Normal file
6
lib/core/utils/validators.dart
Normal file
@@ -0,0 +1,6 @@
|
||||
String? notEmptyValidator(String? value) {
|
||||
if (value == null || value.trim().isEmpty) {
|
||||
return 'Campo obbligatorio';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user