AddonLayer enum
The AddonLayer describes where in the widget tree the AddonLayerEntry.builder is inserted.
The widgets created by the AddonLayerEntry.builders are wrapped around each other and various other widgets of the WerkbankApp or UseCaseDisplay.
The nesting order of the layer is defined as follows. Layers with a "*" are only inserted inside a WerkbankApp and not inside a UseCaseDisplay.
- AddonLayer.management
- AddonLayer.applicationOverlay*
- AddonLayer.mainViewOverlay*
- AddonLayer.useCaseOverlay*
- AddonLayer.affiliationTransition
- AddonLayer.useCase
- AddonLayer.useCaseLayout
- AddonLayer.useCaseFitted
Different layers may provide different assurances and impose different requirements on the AddonLayerEntry.builder. There are some assurances and requirements that hold for all layers.
Assurances for all layers
- If two AddonLayerEntrys in different layers are both included (inside a UseCaseDisplay they could be excluded if they are inside a layer with a "*" in the list above or if they have set AddonLayerEntry.appOnly to true), the widgets created by the AddonLayerEntry.builder of the layer that is ordered earlier are ancestors of the widgets created by the AddonLayerEntry.builder of the layer that is ordered later.
- All methods on the static
accessfield of the respective AddonLayerEntry subclass can be used in the AddonLayerEntry.builder. The object returned by theaccessfield may have different methods depending on the layer. Therefore different layers may have different methods available. See also AddonAccessor, AddonLayerAccessor and UseCaseAccessor.
Requirements for all layers
- The AddonLayerEntry.builder must preserve all assurances that it gets.
- The AddonLayerEntry.builder must build the child exactly once.
- The AddonLayerEntry.builder must preserve the state of the child as long as its own state is preserved. This means if the child is moved in the widget tree, it needs an appropriate Key so that the widget is not rebuilt from scratch.
Values
- management → const AddonLayer
-
The layer that wraps most of the WerkbankApp. This layer is typically used for addons to hold an manage their global state. Additionally the content can be wrapped with a WerkbankSettings widget to change some settings of the WerkbankApp.
Requirements
- No interactive or visible user interfaces must be introduced.
- applicationOverlay → const AddonLayer
-
A layer that is wrapped around the whole user interface of the WerkbankApp.
Assurances
- Theme and localization of the WerkbankApp are available in the context.
- The widget receives tight layout constraints.
- mainViewOverlay → const AddonLayer
-
A layer that wraps the main view. This means if there are multiple use cases visible in an overview, this is wrapped once around the whole overview.
Assurances
- The widget receives tight layout constraints.
- The widget has the theme and localization of the WerkbankApp.
- useCaseOverlay → const AddonLayer
-
A layer that wraps the use case display area. When viewing multiple use cases in an overview, this is wrapped around every single one.
Assurances
- The widget receives tight layout constraints.
- The widget has the theme and localization of the WerkbankApp.
- affiliationTransition → const AddonLayer
-
This is the layer where widgets transition from belonging to the user interface of the WerkbankApp to the user interface of a use case.
Widgets in this layer are inserted into the
builderpassed to the app widget from the AppConfig, which us passed to the WerkbankApp or DisplayApp.For example this is where the theme and localization is set for the use case.
Assurances
- The widget receives tight layout constraints.
Requirements
- No interactive or visible user interfaces must be introduced.
- useCase → const AddonLayer
-
This is the first layer that belongs to the user interface of a use case.
Assurances
- The provided theme and localization is that of the use case.
- The widget receives tight layout constraints.
Requirements
- No UI elements that conceptually belong to the werkbank should be introduced.
- useCaseLayout → const AddonLayer
-
In this layer the use case can be positioned and its constraints can be defined.
Assurances
- The provided theme and localization is that of the use case.
Requirements
- No interactive or visible user interfaces must be introduced.
- useCaseFitted → const AddonLayer
-
This layer tightly wraps the use case.
Putting something in this layer is very similar to wrapping the widget around the widget returned by the UseCaseBuilder of a use case.
Assurances
- The provided theme and localization is that of the use case.
Requirements
- No UI elements that conceptually belong to the werkbank should be introduced.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Constants
-
values
→ const List<
AddonLayer> - A constant List of the values in this enum, in order of their declaration.