RequestInput class

Provides convenient input access for request body, files, and query data.

Constructors

RequestInput(BodyParser _bodyParser, Map<String, String> _queryParams)

Properties

files Map<String, UploadedFile>?
Gets all files.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(String key, dynamic value) → void
Adds or updates a value in the request body.
all() Map<String, dynamic>
Gets all input as map (body + query).
boolean(String key, [bool defaultValue = false]) bool
Gets boolean value.
doubleValue(String key, [double? defaultValue]) double?
Gets double value.
except(List<String> keys) Map<String, dynamic>
Gets all values except specified keys.
file(String fieldName) UploadedFile?
Gets file by field name.
filesByName(String fieldName) List<UploadedFile>
Gets all files with a field name.
get(String key, [dynamic defaultValue]) → dynamic
Gets a value from body or query parameters.
has(String key) bool
Checks if key exists in body or query.
hasAll(List<String> keys) bool
Checks if multiple keys exist.
hasAny(List<String> keys) bool
Checks if any of the keys exist.
hasFile(String fieldName) bool
Checks if file was uploaded.
integer(String key, [int? defaultValue]) int?
Gets integer value.
keys() Set<String>
Gets input keys.
list<T>(String key) List<T>?
Gets list value.
map(String key) Map<String, dynamic>?
Gets map value.
merge(Map<String, dynamic> values) → void
Merges values into the request body.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
only(List<String> keys) Map<String, dynamic>
Gets multiple values at once.
remove(String key) → void
Removes a value from the request body.
string(String key, [String? defaultValue]) String?
Gets string value.
toMap() Map<String, dynamic>
Converts input to map.
toString() String
A string representation of this object.
inherited
typed<T>(String key, [T? defaultValue]) → T?
Gets typed value from body or query.
values() Iterable
Gets input values.

Operators

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