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, [ListFormat collectionFormat = ListFormat.multi])
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.
no setter
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

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