wideView method

SizedBox wideView(
  1. BoxConstraints constraints,
  2. FormSwitcher formSwitcher
)

The layout of the page when the screen width is 600 or more.

Implementation

SizedBox wideView(BoxConstraints constraints, FormSwitcher formSwitcher) {
  return SizedBox.expand(
    child: Row(
      mainAxisAlignment: MainAxisAlignment.spaceAround,
      children: [
        const Expanded(
          flex: 3,
          child: FractionallySizedBox(
            widthFactor: 0.75,
            child: Image(
              image: AssetImage('assets/LogoWit.png'),
            ),
          ),
        ),
        Expanded(
          flex: 2,
          child: FractionallySizedBox(
            widthFactor: 1 - min(0.3, sqrt(constraints.maxWidth - 600) / 100),
            child: SingleChildScrollView(child: Align(child: formSwitcher)),
          ),
        ),
      ],
    ),
  );
}