createChild method

ZenScope createChild({
  1. String? name,
})

Create a child scope from this scope

Child scopes automatically inherit dependencies from their parent and are automatically disposed when the parent is disposed.

Implementation

ZenScope createChild({String? name}) {
  final childName = name ?? 'Child-${++_idCounter}';

  // Create child scope with proper parent relationship
  // Parent tracking is automatic via constructor
  return ZenScope(name: childName, parent: this);
}