sized method
Sets both width and height dimensions simultaneously.
This is a convenience method that allows setting both dimensions in a single call. Either or both dimensions can be specified.
Example:
Container().sized(
width: 100.size,
height: 50.size,
),
Container().sized(width: 200.size), // Only width
Implementation
Widget sized({
SizeUnit? width,
SizeUnit? height,
Key? key,
}) {
return _WidgetWrapper._wrapOrCopyWith(
child: this,
key: key != null ? () => key : null,
width: width != null ? () => width : null,
height: height != null ? () => height : null,
);
}