ZenScopeExtension extension

Extension methods for BuildContext to find a ZenScope.

on

Properties

zenScope → ZenScope?

Available on BuildContext, provided by the ZenScopeExtension extension

Gets the current ZenScope from the widget tree, or returns null if none is found.
no setter
zenScopeRequired → ZenScope

Available on BuildContext, provided by the ZenScopeExtension extension

Gets the current ZenScope from the widget tree (throws if not found)
no setter

Methods

findInScope<T>({String? tag}) → T

Available on BuildContext, provided by the ZenScopeExtension extension

Finds a dependency in the current scope
findInScopeOrNull<T>({String? tag}) → T?

Available on BuildContext, provided by the ZenScopeExtension extension

Finds a dependency in the current scope, returning null if not found
findScope() → ZenScope

Available on BuildContext, provided by the ZenScopeExtension extension

Finds the nearest ZenScope above this context.
mayFindScope() → ZenScope?

Available on BuildContext, provided by the ZenScopeExtension extension

Finds the nearest ZenScope above this context, or returns null if none is found.