constrainedBoth method
Constrains widget with both max width and height.
Implementation
Widget constrainedBoth({double maxWidth = 800, double maxHeight = 600}) {
return Center(
child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: maxWidth, maxHeight: maxHeight),
child: this,
),
);
}