NamedArguments extension
How generated code reads an optional named argument from the map of a
BeanConstructor or BeanMethod call, as Function.apply passes it:
the value when the map has it, else the parameter's default.
// Generated: Book(total: named.argumentOr(#total, 0))
Methods
-
argumentOr<
T> (Symbol name, T absent) → T -
Available on Map<
The argumentSymbol, Object?> , provided by the NamedArguments extensionnameas aT, orabsentwhen it is not passed.