AddonAccessor class abstract
A class that provides access to data in the BuildContext that is available from every place where the Addon API gives access to a BuildContext.
Classes that hold or build widgets within an addon implement a
static access field that returns an instance of this class.
These classes include subclasses of AddonLayerEntry, subclasses of AddonControlSection, HomePageComponent and AddonDescription.
Subclasses of this class such as AddonLayerAccessor and UseCaseAccessor introduce additional data that can be accessed only in specific contexts.
Make sure to use the access field on the class which actually builds
the widgets you want to access the data in. Otherwise the data might not
be available in the BuildContext.
Constructors
- AddonAccessor()
-
const
Properties
- containerName → String
-
no setter
- 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
addonIdif it is active, ornullif not. -
addonsOf(
BuildContext context) → List< Addon> - Returns a list of all active Addons.
-
ensureNotNull<
T extends Object> (T? value) → T -
ensureReturns<
T> (T function()) → T -
isAddonActiveOf(
BuildContext context, String addonId) → bool -
Returns whether the Addon with the given
addonIdis active. -
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