detach method
Mark this render object as detached from its PipelineOwner.
Typically called only from the parent's detach, and by the owner to mark the root of a tree as detached.
Subclasses with children should override this method to
detach all their children after calling the inherited method,
as in super.detach().
Implementation
@override
void detach() {
_controller.unregisterRenderHost(_hostCallback);
// A pending FLIP baseline that was never consumed (widget unmounted
// between mutation and next frame) would leak the offset map and
// trip stale-state assertions on re-attach. Drop it eagerly.
_pendingSlideBaseline = null;
_pendingSlideDuration = null;
_pendingSlideCurve = null;
super.detach();
for (final child in _children.values) {
child.detach();
}
}