ImageData.fromJson constructor

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

Implementation

factory ImageData.fromJson(Map<String, dynamic> json) {
  final url = json['url'];
  final path = json['path'];
  final thumbnailUrl = json['thumbnailUrl'];
  final thumbnailPath = json['thumbnailPath'];
  return ImageData(
    url: url == null ? null : url as String,
    path: path == null ? null : path as String,
    thumbnailUrl: thumbnailUrl == null ? null : thumbnailUrl as String,
    thumbnailPath: thumbnailPath == null ? null : thumbnailPath as String,
  );
}