find< S> method
- @override
override
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 assigned here is by pushing an AnnotatedRegionLayer into the layer tree.
See also:
- AnnotatedRegionLayer, for placing values in the layer tree.
Implementation
@override
S find<S>(Offset regionOffset) {
final S result = super.find<S>(regionOffset);
if (result != null)
return result;
if (size != null && !size.contains(regionOffset))
return null;
if (T == S) {
final Object untypedResult = value;
final S typedResult = untypedResult;
return typedResult;
}
return super.find<S>(regionOffset);
}