Create a NoSuchMethodError corresponding to a failed method call.
The receiver
is the receiver of the method call.
That is, the object on which the method was attempted called.
If the receiver is null
, it is interpreted as a call to a top-level
function of a library.
The memberName
is a Symbol representing the name of the called method
or accessor. It should not be null
.
The positionalArguments
is a list of the positional arguments that the
method was called with. If null
, it is considered equivalent to the
empty list.
The namedArguments
is a map from Symbols to the values of named
arguments that the method was called with.
The optional existingArgumentNames
is the expected parameters of a
method with the same name on the receiver, if available. This is
the signature of the method that would have been called if the parameters
had matched.
Source
NoSuchMethodError(Object receiver,
Symbol memberName,
List positionalArguments,
Map<Symbol ,dynamic> namedArguments,
[List existingArgumentNames = null])
: _receiver = receiver,
_memberName = memberName,
_arguments = positionalArguments,
_namedArguments = namedArguments,
_existingArgumentNames = existingArgumentNames;