createSimpleFileMessage static method

dynamic createSimpleFileMessage({
  1. required String filePath,
  2. required String fileName,
  3. dynamic file,
})

Implementation

static createSimpleFileMessage(
    {required String filePath,
    required String fileName,
    dynamic file}) async {
  return {
    "elemType": 6,
    "type": "file",
    "fileElem": {
      "filePath": filePath,
      "fileName": fileName,
      "file": file ??= await createFile(path: filePath, name: fileName)
    }
  };
}