noSuchMethod method
Sends a method a subclass declared without a body as a typed action.
Dart routes a call to such a method here, as an Invocation. A getter or setter is not an action, so it falls through and throws as usual.
Implementation
@override
dynamic noSuchMethod(Invocation invocation) {
if (!invocation.isMethod) return super.noSuchMethod(invocation);
updateState(
state,
data: {
"action": invocation.memberName,
"args": invocation.positionalArguments,
"named": invocation.namedArguments,
},
);
return null;
}