find<S> method

  1. @override
S find <S>(Offset regionOffset)

Returns the value of S that corresponds to the point described by regionOffset.

Returns null if no matching region is found.

The main way for a value to be found here is by pushing an AnnotatedRegionLayer into the layer tree.

See also:


S find<S>(Offset regionOffset) {
  Layer current = lastChild;
  while (current != null) {
    final Object value = current.find<S>(regionOffset);
    if (value != null) {
      return value;
    current = current.previousSibling;
  return null;