copyExpandCanvas method
void
copyExpandCanvas({})
Implementation
void copyExpandCanvas({
int? newWidth,
int? newHeight,
int? padding,
ExpandCanvasPosition position = ExpandCanvasPosition.center,
Color? backgroundColor,
Image? toImage,
}) {
if ((newWidth == null || newHeight == null) && padding == null) {
throw ArgumentError('Either new dimensions or padding must be provided');
}
if (newWidth != null && newHeight != null && padding != null) {
throw ArgumentError('Cannot provide both new dimensions and padding');
}
subCommand = CopyExpandCanvasCmd(
subCommand,
newWidth: newWidth,
newHeight: newHeight,
padding: padding,
position: position,
backgroundColor: backgroundColor,
toImage: toImage,
);
}