createScope static method

ZenScope createScope({
  1. String? name,
  2. ZenScope? parent,
})

Create a new scope - the main way to work with dependencies

Implementation

static ZenScope createScope({String? name, ZenScope? parent}) {
  return ZenScopeManager.getOrCreateScope(
    name: name ?? 'Scope_${DateTime.now().millisecondsSinceEpoch}',
    parentScope: parent,
    autoDispose: false,
  );
}