uff
This commit is contained in:
@@ -9,8 +9,10 @@ import 'package:flux/features/auth/bloc/auth_cubit.dart';
|
||||
import 'package:flux/features/company/data/company_repository.dart';
|
||||
import 'package:flux/features/operations/blocs/operation_list_cubit.dart';
|
||||
import 'package:flux/features/operations/data/operations_repository.dart';
|
||||
import 'package:flux/features/settings/blocs/settings_cubit.dart';
|
||||
import 'package:flux/features/settings/document_sequence/data/document_sequence_repository.dart';
|
||||
import 'package:flux/features/tickets/data/ticket_repository.dart';
|
||||
import 'package:flux/features/tracking/data/tracking_repository.dart';
|
||||
import 'package:flux/l10n/app_localizations.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
@@ -56,9 +58,15 @@ void main() async {
|
||||
BlocProvider<StoreCubit>(create: (_) => StoreCubit()),
|
||||
BlocProvider<CustomersCubit>(create: (_) => CustomersCubit()),
|
||||
BlocProvider<ProductsCubit>(create: (_) => ProductsCubit()),
|
||||
BlocProvider<StaffCubit>(create: (_) => StaffCubit()),
|
||||
BlocProvider<StaffCubit>(
|
||||
create: (_) => StaffCubit()
|
||||
..loadStaffForStore(
|
||||
GetIt.I.get<SessionCubit>().state.currentStore!.id!,
|
||||
),
|
||||
),
|
||||
BlocProvider<OperationListCubit>(create: (_) => OperationListCubit()),
|
||||
BlocProvider<ProvidersCubit>(create: (_) => ProvidersCubit()),
|
||||
BlocProvider<SettingsCubit>(create: (_) => SettingsCubit()),
|
||||
],
|
||||
child: const FluxApp(),
|
||||
),
|
||||
@@ -112,6 +120,7 @@ Future<void> setupLocator() async {
|
||||
SessionCubit(getIt<CoreRepository>(), getIt<SharedPreferences>()),
|
||||
);
|
||||
getIt.registerLazySingleton<CompanyRepository>(() => CompanyRepository());
|
||||
getIt.registerLazySingleton<TrackingRepository>(() => TrackingRepository());
|
||||
}
|
||||
|
||||
class FluxApp extends StatefulWidget {
|
||||
|
||||
Reference in New Issue
Block a user