build method
Do not override. This method invokes the necessary builders and organizes the screen layout based on the current device.
Implementation
@nonVirtual
@override
Widget build(BuildContext context) {
return SafeArea(
top: false,
maintainBottomViewPadding: true,
child: () {
final screenSize = MediaQuery.of(context).size;
final calculator = ScreenCalculator(screenSize.width, screenSize.height);
final appLayout = AppLayout.fromScreenCalculator(calculator);
switch (appLayout) {
case AppLayout.MOBILE:
final body0 = this.mobileBody(context);
final body5 = this._final(context, body0);
final layout = this.mobileLayout(context, body5);
return layout;
case AppLayout.MOBILE_HORIZONTAL:
final body0 = this.horizontalMobileBody(context);
final body5 = this._final(context, body0);
final layout = this.horizontalMobileLayout(context, body5);
return layout;
case AppLayout.NARROW:
final body0 = this.narrowBody(context);
final body5 = this._final(context, body0);
final layout = this.narrowLayout(context, body5);
return layout;
case AppLayout.WIDE:
final body0 = this.wideBody(context);
final body5 = this._final(context, body0);
final layout = this.wideLayout(context, body5);
return layout;
default:
final body0 = this.body(context);
final body5 = this._final(context, body0);
final layout = this.layout(context, body5);
return layout;
}
}(),
);
}