removePlugin method

Future<void> removePlugin(
  1. Plugin plugin
)

Removes a plugin from this App.

Implementation

Future<void> removePlugin(Plugin plugin) async {
  if (!_plugins.remove(plugin)) {
    return;
  }

  if (!plugin.initialized) {
    return;
  }

  if (!plugin.disposed) {
    try {
      await _disposePlugin(plugin);
    } catch (error) {
      // Allow the error system to find out
      // what's going on so we rethrow.
      rethrow;
    }
  }
}