ImageEntity.fromJson constructor

ImageEntity.fromJson(
  1. dynamic data
)

Implementation

ImageEntity.fromJson(data) {
  Map<String, dynamic> json =
      data is Map ? data.cast<String, dynamic>() : jsonDecode(data);
  if (json['size'] != null) size = json['size'];
  if (json['width'] != null) width = json['width'];
  if (json['type'] != null) type = ImageTypeTool.getByInt(json["type"]);
  if (json['uUID'] != null) uuid = json['uUID'];
  if (json['url'] != null) url = json['url'];
  if (json['height'] != null) height = json['height'];
}