ImageData.fromMap constructor

ImageData.fromMap(
  1. LinkedHashMap<Object?, Object?> map
)

Implementation

ImageData.fromMap(LinkedHashMap<Object?, Object?> map) {
  fileName = map["fileName"].toString();
  filePath = map["filePath"].toString();

  if (map["amazonImageUrl"] != null) {
    amazonUrl = map["amazonImageUrl"].toString();
  }

  if (map["progress"] != null) {
    progress = double.parse(map["progress"].toString().trim());
  }

  state = map["state"]?.toString();
  if (map["isUploadError"] != null) {
    isUploadError = map["isUploadError"] as bool;
  }

  imageUploadFolder = map["imageUploadFolder"]?.toString();
}