ApiError.fromJson constructor
Factory that returns ApiError class from json
Map.
Implementation
factory ApiError.fromJson(Map<String, dynamic> json) {
return ApiError(
code: int.parse(json['cod'].toString()),
message: json['message'] as String,
);
}