Position.fromJson constructor
Implementation
factory Position.fromJson(Map<String, dynamic> j) {
final className = j['className'] as String;
switch (className) {
case 'Point':
case 'DynamicPosition':
case 'DynamicElementPosition':
return Point.fromJson(j);
default:
throw StateError("Can't handle JSON with `className`: $className");
}
}