factory NPoint.fromJson(Map<String, dynamic> json) { return NPoint(json['x']?.toDouble() ?? 0.0, json['y']?.toDouble() ?? 0.0); }