buildEmptyApp method
Implementation
Widget buildEmptyApp({required Widget child}) {
return BlocBuilderWidget(
bloc: BlocProvider.of<FastThemeBloc>(context),
builder: (BuildContext context, state) {
final appLocale = widget.locale ?? const Locale('en', 'US');
final useDarkTheme = state.brightness == Brightness.dark;
var theme = widget.lightTheme ?? FastTheme.light.blue;
if (useDarkTheme && widget.darkTheme != null) {
theme = widget.darkTheme ?? FastTheme.dark.blue;
}
return Localizations(
delegates: _localizationsDelegates.toList(),
locale: appLocale,
child: MediaQuery.fromView(
view: View.of(context),
child: AnimatedTheme(
data: theme,
child: Builder(
builder: (context) {
return Container(
color:
ThemeHelper.colors.getPrimaryBackgroundColor(context),
child: FastPageLayout(child: child),
);
},
),
),
),
);
},
);
}