populate method

  1. @override
dynamic populate(
  1. dynamic data
)
override

Populates class properties via data object. @param data Data object.

Implementation

@override
dynamic populate(dynamic data) {
  if (data != null) {
    name ??= data["name"];
    CID ??= data["CID"];
    CIDv1 ??= data["CIDv1"];
    status ??= FileStatus.getByValue(data["fileStatus"]);
    if (data["type"] != null) {
      type ??= StorageContentType.getByValue(data["type"]);
    }
    link ??= data["link"];
    path ??= data["path"];
    directoryUuid ??= data["directoryUuid"];
    return super.populate(data);
  }
}