ImageResource.fromJson constructor

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

Implementation

factory ImageResource.fromJson(Map<String, dynamic> json) {
  return ImageResource(
    url: json['url'] as String,
    sizes: json.containsKey('sizes') ? json['sizes'] as String : null,
    type: json.containsKey('type') ? json['type'] as String : null,
  );
}