W3cubDocs

/Dart 2

noSuchMethod method

dynamic noSuchMethod (Invocation invocation)

Invoked when a non-existent method or property is accessed.

Classes can override noSuchMethod to provide custom behavior.

If a value is returned, it becomes the result of the original invocation.

The default behavior is to throw a NoSuchMethodError.

Implementation

external dynamic noSuchMethod(Invocation invocation);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-core/Object/noSuchMethod.html