scoped method

IocContainer scoped({
  1. bool useExistingSingletons = false,
})

⌖ Creates a new Ioc Container for a particular scope. Does not use existing singletons/scope by default. Warning: if you use the existing singletons, calling dispose will dispose those singletons

Implementation

IocContainer scoped({
  bool useExistingSingletons = false,
}) =>
    IocContainer(
      serviceDefinitionsByType,
      useExistingSingletons ? Map<Type, Object>.from(singletons) : {},
      isScoped: true,
    );