clone method

Hub clone()

Clones the Hub

Implementation

Hub clone() {
  if (!_isEnabled) {
    _options.logger(SentryLevel.warning, 'Disabled Hub cloned.');
  }
  final clone = Hub(_options);
  for (final item in _stack) {
    clone._stack.add(_StackItem(item.client, item.scope.clone()));
  }
  return clone;
}