Area.fromRectangle constructor

Area.fromRectangle(
  1. Length length,
  2. Length width
)

Returns a new Area object from the length and width of a rectangle.

Implementation

factory Area.fromRectangle(Length length, Length width) {
  return Area.fromSquareCentimetres(
      length.inCentimetres * width.inCentimetres);
}