ZenRoute constructor

const ZenRoute({
  1. Key? key,
  2. required ZenModule moduleBuilder(),
  3. required Widget page,
  4. String? scopeName,
  5. bool? autoDispose,
  6. Widget onError(
    1. Object error
    )?,
  7. Widget? loadingWidget,
  8. bool? useParentScope,
  9. ZenScope? parentScope,
})

Creates a ZenRoute widget.

The moduleBuilder and page parameters are required. All other parameters provide fine-grained control over scope behavior.

Implementation

const ZenRoute({
  super.key,
  required this.moduleBuilder,
  required this.page,
  this.scopeName,
  this.autoDispose,
  this.onError,
  this.loadingWidget,
  bool? useParentScope, // nullable parameter
  this.parentScope,
}) : useParentScope =
          useParentScope ?? (parentScope != null);