GetClimateProductsResponse.fromJson constructor

GetClimateProductsResponse.fromJson(
  1. Object? json
)

Implementation

factory GetClimateProductsResponse.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return GetClimateProductsResponse(
    data: (map['data'] as List<Object?>)
        .map((el) => ClimateProduct.fromJson(el))
        .toList(),
    hasMore: (map['has_more'] as bool),
    url: (map['url'] as String),
  );
}