MethodInvocation<T> class

Represents a method invocation parameters.

Constructors

MethodInvocation(Type classType, String methodName, List normalParameters, [List? optionalParameters, Map<String, dynamic>? namedParameters])
MethodInvocation.withPositionalParametersNames(Type classType, String methodName, List<String>? positionalParametersNames, List normalParameters, [List? optionalParameters, Map<String, dynamic>? namedParameters])
Constructor with positionalParametersNames. See parametersToMap.

Properties

classType Type
The class Type of this invocation parameters.
final
hashCode int
The hash code for this object.
no setterinherited
methodName String
The method name of this invocation parameters.
final
namedArguments Map<Symbol, dynamic>?
The named arguments, derived from namedParameters. Used by invoke.
no setter
namedParameters Map<String, dynamic>?
The named parameters of the related method.
final
normalParameters List
The normal positional parameters of the related method.
final
optionalParameters List?
The optional positional parameters of the related method.
final
positionalArguments List
The positional arguments, derived from normalParameters and optionalParameters. Used by invoke.
no setter
positionalParametersNames List<String>?
The list of positional parameters names.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

invoke<R>(Function f) → R
Invokes the Function f with positionalArguments and namedArguments.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parametersToMap() Map<String, dynamic>
Return all parameters as a Map with of parameters names and values.
toString() String
A string representation of this object.
override

Operators

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