Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (this.parent) {
this.parent = null;
} else if (this.isAttached) {
Widget.detach(this);
}
// Dispose of the widget layout.
if (this._layout) {
this._layout.dispose();
this._layout = null;
}
// Clear the extra data associated with the widget.
Signal.clearData(this);
MessageLoop.clearData(this);
AttachedProperty.clearData(this);
}