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({bool camelCaseContentDisposition = false})
FormData.fromMap(Map<String, dynamic> map, [ListFormat collectionFormat = ListFormat.multi, bool camelCaseContentDisposition = false])
Create FormData instance with a Map.

Properties

boundary String
The boundary of FormData, it consists of a constant prefix and a random postfix to assure the the boundary unpredictable and unique, each FormData instance will be different.
read-only
camelCaseContentDisposition bool
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.
read-onlyinherited
isFinalized bool
Whether finalize has been called.
read-only
length int
The total length of the request body, in bytes. This is calculated from fields and files and cannot be set manually.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

finalize() Stream<List<int>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readAsBytes() Future<List<int>>
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