CropImage constructor
CropImage({})
Implementation
CropImage({
Key? key,
required this.image,
int? width,
int? height,
int srcX = 0,
int srcY = 0,
int? srcWidth,
int? srcHeight,
}) : assert((srcWidth ?? 0) >= 0),
assert((srcHeight ?? 0) >= 0),
src = ui.Rect.fromLTWH(
srcX.toDouble(),
srcY.toDouble(),
(srcWidth ?? image.width).toDouble(),
(srcHeight ?? image.height).toDouble(),
),
dst = ui.Rect.fromLTWH(
0,
0,
(width ?? image.width).toDouble(),
(height ?? image.height).toDouble(),
),
super(key: key);