parsePointFromString function
Parses s
as a Point.
Implementation
Point<num>? parsePointFromString(String? s) {
if (s == null) return null;
s = s.trim();
if (s.isEmpty) return null;
var parts = s.split(RegExp(r'\s*,\s*'));
if (parts.length < 2) return null;
var nums = parts.map((e) => parseNum(e)).whereType<num>().toList();
if (nums.length < 2) return null;
return Point<num>(nums[0], nums[1]);
}