dispose method

Future<void> dispose()

Disposes the view.

The UiKitViewController object is unusable after calling this. The id of the platform view cannot be reused after the view is disposed.

Implementation

Future<void> dispose() async {
  _debugDisposed = true;
  await SystemChannels.platform_views.invokeMethod<void>('dispose', id);
  PlatformViewsService._instance._focusCallbacks.remove(id);
}