fromJson static method

Point? fromJson(
  1. Map<String, dynamic>? json
)

Implementation

static Point? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return Point(
    x: ((json['x'] as num?) ?? 0.0).toDouble(),
    y: ((json['y'] as num?) ?? 0.0).toDouble(),
  );
}