Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class _AppState extends State<App> {
- final ThemeMode _themeMode = ThemeMode.light;
- @override
- Widget build(BuildContext context) => MultiRepositoryProvider(
- providers: [
- RepositoryProvider(
- create: (context) => UserRepository(
- userService: UserService(), logger: Logger())),
- RepositoryProvider(
- create: (context) =>
- CustomerRepository(customerService: CustomerService())),
- RepositoryProvider(
- create: (context) =>
- RepairRepository(repairService: RepairService())),
- RepositoryProvider(
- create: (context) =>
- TechnicianRepository(technicianService: context.read())),
- ],
- child: MultiProvider(
- providers: [
- /* Provider(
- create: (_) => CustomerBloc(
- customerRepository:
- CustomerRepository(customerService: CustomerService())),
- ), */
- BlocProvider(
- create: (_) => CustomerBloc(
- customerRepository: CustomerRepository(
- customerService: CustomerService()))
- ..customersLoad()),
- BlocProvider(
- create: ((_) => UserCubit(
- userRepository: UserRepository(
- userService: UserService(), logger: Logger())))),
- BlocProvider(
- create: (_) => TechnicianCubit(
- technicianRepository: TechnicianRepository(
- technicianService: TechnicianService()))),
- Provider(
- create: (_) => Logger(),
- ),
- ],
- child: GetMaterialApp(
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement