copyWith method
Creates a copy of this size with optionally different width or height.
If width or height is not provided, the current value is retained.
Implementation
LayoutSize copyWith({
double? width,
double? height,
}) {
return LayoutSize(
width ?? this.width,
height ?? this.height,
);
}