setFileDataFromUpdate static method

FileData setFileDataFromUpdate({
  1. required String? path,
})

selected file path or url to set FileData

Implementation

static FileData setFileDataFromUpdate({required String? path}) {
  FileData fileData = FileData();
  if (!Files._isNullOREmpty(path)) {
    fileData.hasFile = true;
    fileData.fileName = Files.getFileName(path);
    fileData.path = path!;
  }
  return fileData;
}