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()
FormData.fromMap(Map<String, dynamic> map)
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
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-only, inherited
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-only, inherited

Methods

finalize() Stream<List<int>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
readAsBytes() Future<List<int>>
Transform the entire FormData contents as a list of bytes asynchronously.
toString() String
Returns a string representation of this object.
inherited

Operators

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