attach method Null safety
- covariant PipelineOwner owner
override
Mark this node as attached to the given owner.
Typically called only from the parent's attach method, and by the
owner
to mark the root of a tree as attached.
Subclasses with children should override this method to first call their
inherited attach method, and then attach all their children to the
same owner
.
Implementations of this method should start with a call to the inherited
method, as in super.attach(owner)
.
Implementation
@override
void attach(PipelineOwner owner) {
super.attach(owner);
_foregroundRenderObject?.attach(owner);
_backgroundRenderObject?.attach(owner);
_tap = TapGestureRecognizer(debugOwner: this)
..onTapDown = _handleTapDown
..onTap = _handleTap;
_longPress = LongPressGestureRecognizer(debugOwner: this)..onLongPress = _handleLongPress;
_offset.addListener(markNeedsPaint);
_showHideCursor();
_showCursor.addListener(_showHideCursor);
}