Bounds.fromRect constructor

Bounds.fromRect(
  1. Rect rect
)

Creates a Bounds from a Rect.

Implementation

factory Bounds.fromRect(Rect rect) {
  return Bounds(
    x: rect.left,
    y: rect.top,
    width: rect.width,
    height: rect.height,
  );
}