parsePointFromList function

Point<num>? parsePointFromList(
  1. List? list
)

Parses list as a Point.

Implementation

Point<num>? parsePointFromList(List? list) {
  if (list == null || list.length < 2) return null;
  var x = parseNum(list[0]);
  var y = parseNum(list[1]);
  return x != null && y != null ? Point<num>(x, y) : null;
}