Google is committed to advancing racial equity for Black communities. See how.

disconnect method

*<Null safety>*

Future<void> disconnect ()

Disconnects the view from the ViewHolderToken.

This should not be called in onViewDisconnected callback. The need to disconnect, without exiting the underlying component is rare. Most views are closed by first exiting their component, in which case the callback onViewDisconnect is invoked.

Implementation

Future<void> disconnect() async {
  fuchsiaViewsService.deregister(viewId);
  await fuchsiaViewsService.destroyView(viewId);
  onViewDisconnected?.call(this);
}