ApiFile constructor

const ApiFile({
  1. required String fieldName,
  2. File? file,
  3. List<int>? bytes,
  4. String? filename,
  5. String? mimeType,
})

Creates an ApiFile. Either file or bytes must be provided.

Implementation

const ApiFile({
  required this.fieldName,
  this.file,
  this.bytes,
  this.filename,
  this.mimeType,
}) : assert(
        file != null || bytes != null,
        'ApiFile: either file or bytes must be provided',
      );