terminate static method

Future<void> terminate()

Terminates the plugin. In Flutter 3.10 or later, this method must be called before the application exits. Prior to Flutter 3.10, this method does not need to be called. because the plugin automatically exits.

Since WidgetsBindingObserver.didRequestAppExit was added in Flutter 3.10, that could be used as a timing for plugin termination.

Implementation

static Future<void> terminate() async {
  await _channel.invokeMethod('shutdownCef');
  _pluginState = _PluginState.uninitialized;
  log.fine('LinuxWebviewPlugin has been terminated.');
}