pushNewScopeAsync abstract method

Future<void> pushNewScopeAsync({
  1. Future<void> init(
    1. GetIt getIt
    )?,
  2. String? scopeName,
  3. ScopeDisposeFunc? dispose,
})

Creates a new registration scope. If you register types after creating a new scope they will hide any previous registration of the same type. Scopes allow you to manage different live times of your Objects. scopeName if you name a scope you can pop all scopes above the named one by using the name. dispose function that will be called when you pop this scope. The scope is still valid while it is executed init optional asynchronous function to register Objects immediately after the new scope is pushed. This ensures that onScopeChanged will be called after their registration

Implementation

Future<void> pushNewScopeAsync({
  Future<void> Function(GetIt getIt)? init,
  String? scopeName,
  ScopeDisposeFunc? dispose,
});