Rect<T extends num> constructor
- T? left,
- T? top,
- T? width,
- T? height,
Creates a new Rect.
If left
, top
, width
, or height
are not provided, they default to 0
of type T
.
Implementation
factory Rect([T? left, T? top, T? width, T? height]) {
var zero = 0 as T;
return Rect<T>._(left ?? zero, top ?? zero, width ?? zero, height ?? zero);
}