attached property

bool get attached

Whether the layer tree containing this layer is attached to an owner.

This becomes true during the call to attach.

This becomes false during the call to detach.

Implementation

bool get attached => _owner != null;