appendFile method
Appends a new file onto an existing key inside a FormData object, or adds the key if it does not already exist. In opposite to the append method, it has additional settings related to the file.
Implementation
void appendFile(
String key,
File file, {
MediaType? contentType,
String? filename,
}) {
ArgumentError.checkNotNull(key, 'key');
ArgumentError.checkNotNull(file, 'file');
final fileField = FileField(
file: file,
filename: filename,
contentType: contentType,
);
_addEntry(key, fileField);
}