FormData class
A class to create readable "multipart/form-data" streams. It can be used to submit forms and file uploads to http server.
- Mixed in types
Constructors
- FormData()
-
FormData.fromEntries(List<
MapEntry< entries)String, dynamic> > - FormData.fromJson(dynamic json)
-
Deserialize FormData from json.
factory
Properties
-
entries
→ List<
MapEntry< String, dynamic> > -
Returns an Iterable allowing to go through all FormData entries.
final
- files → Iterable
-
Returns an Iterable allowing to go through all
files contained in this object.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
keys
→ Iterable<
String> -
Returns an Iterable allowing to go through all
keys contained in this object.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- values → Iterable
-
Returns an Iterable allowing to go through all
values contained in this object.
no setter
Methods
-
append(
String key, dynamic value) → void - Appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist.
-
appendFile(
String key, File file, {MediaType? contentType, String? filename}) → void - Appends a new file onto an existing key inside a FormData object, or adds the key if it does not already exist. In opposite to the append method, it has additional settings related to the file.
-
delete(
String key) → void - Deletes a key/value pair from a FormData object.
-
has(
String key) → bool - Returns a bool value stating whether a FormData object contains a certain key.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
String key, dynamic value) → void - Replaces value for an existing key inside a FormData object, or adds the key/value if it does not already exist.
-
toJson(
) → Map< String, dynamic> -
Serialize FormData to json.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited