MapValueResolver class final
A ValueResolver that reads the values from a map keyed by parameter path, the one to use with DataBinder.construct in most cases.
// A book with two tags, created from form input.
binder.construct(MapValueResolver({'isbn': '978-0', 'tags[0]': 'sf'}));
- Implemented types
Constructors
-
MapValueResolver(Map<
String, Object?> values) -
A resolver over
values.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
names
→ Set<
String> -
Every name a value exists for. The binder searches it for prefixes
(
author.,tags[) to decide whether to build a nested object, list or map.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
values
→ Map<
String, Object?> -
The input values, keyed by parameter path (
isbn,tags[0]).final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveValue(
String name, Type type) → Object? -
The input for the parameter path
name(isbn,author.name,tags[0]), whose declared type istype;nullwhen there is none.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited