parsePointFromMap function

Point<num>? parsePointFromMap(
  1. Map map
)

Parses map as a Point.

Implementation

Point<num>? parsePointFromMap(Map map) {
  var x = parseNum(
      findKeyValue(toNonNullMap<String, Object>(map), ['x', 'left'], true));
  var y = parseNum(
      findKeyValue(toNonNullMap<String, Object>(map), ['y', 'top'], true));
  if (x == null || y == null) return null;
  return Point<num>(x, y);
}