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