getTextFile method
Returns file for given field
in form-data body. Returns null, if the field
is not found, not a file field or body is not form-data.
Implementation
Future<TextFileFormField?> getTextFile(String field) async {
final data = await bodyAsFormData();
final fieldData = data[field];
if (fieldData is! TextFileFormField) {
return null;
}
return fieldData;
}