Wind.fromJson constructor Null safety

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

Implementation

factory Wind.fromJson(Map<String, dynamic> json) => Wind(
      speed: json["speed"]?.toDouble() ?? 0,
      deg: json["deg"] ?? 0,
      gust: json["gust"]?.toDouble() ?? 0,
    );