constrained method
Centers the widget and ensures its width does not exceed maxWidth.
Essential for preventing content stretching on large monitors.
Implementation
Widget constrained({double maxWidth = 800}) {
return Center(
child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: maxWidth),
child: this,
),
);
}