operator / method
Returns a list of Sprites.
Implementation
List<Sprite> operator /(Object other) {
if (other is Image) {
return _rects.map((rect) {
return Sprite(
other,
srcPosition: Vector2(rect.left, rect.top),
srcSize: Vector2(rect.width, rect.height),
);
}).toList();
} else {
throw ArgumentError(
'SpritExp can only be divided by an Image',
);
}
}