FileField class abstract

Represents File that can be attached to BaseApiRequest so can be sent to API with FormDataRequest

Implementers

Constructors

FileField({required File file, String? filename, MediaType? contentType})
factory
FileField.fromJson(dynamic json)
Construct FileField that only represents file without including it. This constructor can be used for caching.
factory
FileField.fromStream({required Stream<List<int>> stream, required int length, String? filename, MediaType? contentType})
Creates FileField from byte stream.
factory

Properties

contentType MediaType?
final
filename String?
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>?
This method is most commonly used to convert FileField to JSON in order to prepare it for caching.
toMultipartFile(String field) Future<MultipartFile?>
Convert FileField to multipart file.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited