resize method
Implementation
void resize({int width = 0, int height = 0}) {
if (width < 0 && width != originalSize) {
throw ArgumentError('Width must be a positive number.');
}
if (height < 0 && height != originalSize) {
throw ArgumentError('Height must be a positive number.');
}
if (width == 0 && height == 0) {
throw ArgumentError('Both width and height must not be zero.');
}
_hasResize = true;
_resizeHeight = height;
_resizeWidth = width;
}