DrawableViewport constructor
Creates a new DrawableViewport, which acts as a bounding box for the Drawable and specifies what offset (if any) the coordinate system needs to be translated by.
Both rect
and offset
must not be null.
Implementation
const DrawableViewport(
this.size,
this.viewBox, {
this.viewBoxOffset = Offset.zero,
}) : assert(size != null), // ignore: unnecessary_null_comparison
assert(viewBox != null), // ignore: unnecessary_null_comparison
assert(viewBoxOffset != null);