- override
Remove the given child from the element's child list, in preparation for the child being reused elsewhere in the element tree.
This updates the child model such that, e.g., visitChildren does not
walk that child anymore.
The element will still have a valid parent when this is called. After this
is called, deactivateChild is called to sever the link to this object.
Source
@override
void forgetChild(Element child) {
assert(() {
// TODO(ianh): implement forgetChild for VirtualViewport
throw new FlutterError(
'$runtimeType does not yet support GlobalKey reparenting of its children.\n'
'As a temporary workaround, wrap the child with the GlobalKey in a '
'Container or other harmless child.'
);
});
}