popTransform method
Removes the last transform added via pushTransform or pushOffset.
This method is only to be used by subclasses, which must provide coordinate space specific public wrappers around this function for their users (see BoxHitTestResult.addWithPaintTransform for such an example).
This method must be called after hit testing is done on a child that required a call to pushTransform or pushOffset.
See also:
- pushTransform and pushOffset, which describes the use case of this function pair in more details.
Implementation
@protected
void popTransform() {
if (_localTransforms.isNotEmpty) {
_localTransforms.removeLast();
} else {
_transforms.removeLast();
}
assert(_transforms.isNotEmpty);
}