build method
dynamic
build
(- dynamic context
)
Implementation
@override
Widget build(BuildContext context) {
return MultiBlocProvider(
providers: [
BlocProvider<PrefsBloc>(
create: (context) {
PrefsBloc pBloc = PrefsBloc();
pBloc.add(LoadPrefsEvent());
return pBloc;
},
),
BlocProvider<AuthenticationBloc>(create: (context) {
AuthenticationBloc aBloc =
AuthenticationBloc(authRepository: AuthRepository());
aBloc.add(AuthenticationStarted());
return aBloc;
}),
],
child: BlocBuilder<PrefsBloc, PrefsState>(
builder: (context, state) => _buildWithTheme(context, state)),
);
}