copyWith method Null safety
Creates a copy of this box constraints but with the given fields replaced with the new values.
Implementation
BoxConstraints copyWith({
double? minWidth,
double? maxWidth,
double? minHeight,
double? maxHeight,
}) {
return BoxConstraints(
minWidth: minWidth ?? this.minWidth,
maxWidth: maxWidth ?? this.maxWidth,
minHeight: minHeight ?? this.minHeight,
maxHeight: maxHeight ?? this.maxHeight,
);
}