initFromMap method

void initFromMap(
  1. LinkedHashMap<Object?, Object?> map
)

Implementation

void initFromMap(LinkedHashMap<Object?, Object?> map) {
  if (map["fileName"] != null) {
    fileName = map["fileName"].toString();
  }

  if (map["filePath"] != null) {
    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();
}