addFile method

void addFile({
  1. required File file,
  2. String? fieldName,
})

Add a file to be uploaded along with the Assembly.

Implementation

void addFile({required File file, String? fieldName}) {
  fieldName = fieldName ?? getFieldName();
  files[fieldName] = XFile(file.path);
}