getOrCreateScope method

Scope getOrCreateScope([
  1. Koin? koin
])

Implementation

Scope getOrCreateScope([Koin? koin]) {
  koin ??= KoinContextHandler.get();
  var currentScope = getScopeOrNull(koin);

  if (currentScope == null) {
    return createScope(koin);
  }

  return currentScope;
}