ZenScopeWidget constructor

const ZenScopeWidget({
  1. Key? key,
  2. required Widget child,
  3. ZenScope? scope,
  4. ZenModule moduleBuilder()?,
  5. String? scopeName,
})

Creates a ZenScopeWidget that provides a scope to its descendants.

Either scope or moduleBuilder must be provided, but not both.

Implementation

const ZenScopeWidget({
  super.key,
  required this.child,
  this.scope,
  this.moduleBuilder,
  this.scopeName,
}) : assert(
          (scope != null && moduleBuilder == null) ||
              (scope == null && moduleBuilder != null),
          'Either scope or moduleBuilder must be provided, but not both');