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?)?.toDouble() ?? 0.0,
    y: (json['y'] as num?)?.toDouble() ?? 0.0,
  );
}