FormData class

A class to create readable "multipart/form-data" streams. It can be used to submit forms and file uploads to http server.

Constructors

FormData({String boundaryName = _boundaryName, bool camelCaseContentDisposition = false})
FormData.fromMap(Map<String, dynamic> map, [ListFormat listFormat = ListFormat.multi, bool camelCaseContentDisposition = false, String boundaryName = _boundaryName])
Create FormData from a Map.

Properties

boundary String
The Content-Type field for multipart entities requires one parameter, "boundary", which is used to specify the encapsulation boundary.
no setter
boundaryName String
Provides the boundary name which will be used to construct boundaries in the FormData with additional prefix and suffix.
final
camelCaseContentDisposition bool
Whether the 'content-disposition' header can be 'Content-Disposition'.
final
fields List<MapEntry<String, String>>
The form fields to send for this request.
final
files List<MapEntry<String, MultipartFile>>
The files.
final
hashCode int
The hash code for this object.
no setterinherited
isFinalized bool
Whether finalize has been called.
no setter
length int
The total length of the request body, in bytes. This is calculated from fields and files and cannot be set manually.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clone() FormData
finalize() Stream<Uint8List>
Commits all fields and files into a stream for the final sending.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readAsBytes() Future<Uint8List>
Transform the entire FormData contents as a list of bytes asynchronously.
toString() String
A string representation of this object.
inherited

Operators

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