W3cubDocs

/Dart 2

delegate method

dynamic delegate (Invocation invocation)

Performs invocation on the reflectee of this ObjectMirror.

Equivalent to

if (invocation.isGetter) {
  return this.getField(invocation.memberName).reflectee;
} else if (invocation.isSetter) {
  return this.setField(invocation.memberName,
                       invocation.positionalArguments[0]).reflectee;
} else {
  return this.invoke(invocation.memberName,
                     invocation.positionalArguments,
                     invocation.namedArguments).reflectee;
}

Implementation

delegate(Invocation invocation);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-mirrors/ObjectMirror/delegate.html