setLockUpdate static method

LogError setLockUpdate(
  1. bool lock, {
  2. String logger = 'Main',
})

Locks or unlocks updates for the specified logger.

  • lock: If true, locks updates; if false, unlocks them.
  • logger: The logger name (defaults to "Main").

Returns: A LogError indicating success or failure.

Implementation

static LogError setLockUpdate(bool lock, {String logger = 'Main'}) {
  return isCriticalMode
      ? LogError(-5, message: 'is in critical mode')
      : loggerManager.setLockUpdate(lock, logger: logger);
}