parseRectangle function

Rectangle<num>? parseRectangle(
  1. Object? value
)

Parses value as a Rectangle.

Implementation

Rectangle<num>? parseRectangle(Object? value) {
  if (value is List) return parseRectangleFromList(value);
  if (value is Map) {
    return parseRectangleFromMap(toNonNullMap<String, Object>(value));
  }
  if (value is String) return parseRectangleFromString(value);
  return null;
}