disable method

void disable(
  1. String hookId
)

Disable a hook without unregistering it.

Implementation

void disable(String hookId) {
  final registration = _registrationsById[hookId];
  if (registration == null) {
    throw ArgumentError('No hook registered with id "$hookId"');
  }
  registration.enabled = false;
}