wideLayout method

Widget wideLayout(
  1. BuildContext context,
  2. Widget body
)

Activates for non-mobile wide screen sizes, such as a wide desktop window or screen. Override to customize the layout for these sizes. The body includes the widget returned by wideBody.

Implementation

Widget wideLayout(BuildContext context, Widget body) {
  return Container(
    color: Theme.of(context).colorScheme.surfaceContainer,
    child: Center(
      child: LayoutBuilder(
        builder: (context, constraints) {
          return ConstrainedBox(
            constraints: BoxConstraints(
              maxWidth: constraints.maxHeight / MIN_MOBILE_ASPECT_RATIO,
              maxHeight: double.infinity,
            ),
            child: Container(
              decoration: BoxDecoration(
                borderRadius: BorderRadius.circular(14.0),
                color: Colors.transparent,
                boxShadow: [
                  BoxShadow(
                    color: Theme.of(context).colorScheme.shadow,
                    blurRadius: 6.0,
                  ),
                ],
              ),
              child: MSurface(
                borderRadius: BorderRadius.circular(14.0),
                color: Colors.transparent,
                child: this.layout(context, body),
              ),
            ),
          );
        },
      ),
    ),
  );
}