detach method
Detaches any active portal.
Returns a future that completes when the existing portal is detached.
Implementation
@override
Future<void> detach() {
_attachedPortal!.setAttachedHost(null);
_attachedPortal = null;
if (_detachPortal != null) {
_detachPortal!();
_detachPortal = null;
}
return Future.value();
}