AddonLayerAccessor class abstract

A class that provides access to data in the BuildContext that is available from within the widgets built by the AddonLayerEntry.builder of any layer.

To obtain an instance of this class call the static access field on the AddonLayerEntry subclass in which the widgets you want to access the data in are built.

Inheritance
Implementers

Constructors

AddonLayerAccessor()
const

Properties

containerName String
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addonByIdOf(BuildContext context, String addonId) Addon?
Returns the Addon by the given addonId if it is active, or null if not.
inherited
addonsOf(BuildContext context) List<Addon>
Returns a list of all active Addons.
inherited
ensureNotNull<T extends Object>(T? value) → T
inherited
ensureReturns<T>(T function()) → T
inherited
environmentOf(BuildContext context) WerkbankEnvironment
Gets the WerkbankEnvironment of the current addon. This is one of WerkbankEnvironment.app or WerkbankEnvironment.display. This can be used by addons for example to omit certain visual overlays or similar with a DisplayApp widget, since they only make sense in an environment where the user interacts with the WerkbankApp application.
isAddonActiveOf(BuildContext context, String addonId) bool
Returns whether the Addon with the given addonId is active.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited