disposableElement method
It creates an disposable off-list element built with the specified widget
,
and executes the callback
. Eventually, the child is disposed.
Implementation
void disposableElement(Widget widget, void Function(RenderBox) callback) {
owner!.lockState(() {
_currentlyUpdatingChildIndex = null;
_currentlyUpdatingPopUpList = null;
_creatingDisposableElement = true;
var _measuringOffListChild = updateChild(null, widget, null);
assert(_measuringOffListChild != null);
callback.call(_measuringOffListChild!.renderObject! as RenderBox);
_measuringOffListChild = updateChild(_measuringOffListChild, null, null);
_creatingDisposableElement = false;
assert(_measuringOffListChild == null);
});
}