-
-
Save kharitonovAL/dab9484c5745a4cee62f43db7dcdf82b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Widget build( | |
BuildContext context, | |
) => | |
ScreenUtilInit( | |
designSize: const Size(1920, 1080), | |
// We take MultiBlocProvider to pass multiple | |
// Blocs to the child MateialApp | |
builder: (context, widget) => MultiBlocProvider( | |
providers: [ | |
BlocProvider( | |
create: (context) => RequestsTabCubit(), | |
), | |
BlocProvider( | |
create: (context) => SortingCubit(), | |
), | |
BlocProvider( | |
create: (context) => HousesTabCubit(), | |
), | |
BlocProvider( | |
create: (context) => CountersTabCubit(), | |
), | |
BlocProvider( | |
create: (context) => PartnersTabCubit(), | |
), | |
], | |
child: MaterialApp( | |
debugShowCheckedModeBanner: false, | |
theme: AppTheme.light, | |
home: widget, | |
localizationsDelegates: const [ | |
GlobalMaterialLocalizations.delegate, | |
GlobalWidgetsLocalizations.delegate, | |
GlobalCupertinoLocalizations.delegate, | |
], | |
supportedLocales: const [ | |
Locale('ru', 'RU'), | |
], | |
), | |
), | |
child: FlowBuilder<AuthenticationStatus>( | |
// ignore: avoid_types_on_closure_parameters | |
state: context.select((AppBloc bloc) => bloc.state.status), | |
onGeneratePages: onGenerateAppViewPages, | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment