DigiaSlot class

Renders inline campaign content (banners, cards, widgets) at a specific placement position in scrolling content or screen layouts.

The placementKey is the link between developer code and the Digia dashboard — the marketer selects the same key when creating inline content.

Lifecycle:

  • Shows content as soon as a matching campaign is stored for placementKey.
  • Fires an impression event the first time each unique payload renders.
  • Collapses to SizedBox.shrink when no campaign is active.
  • The campaign persists in the controller when the page is disposed so it reappears on the next visit. Only the server (via onExperienceInvalidated) or an explicit user dismiss clears it.
// Self-sizing (recommended)
DigiaSlot('hero_banner')

// With explicit height
SizedBox(
  height: 200,
  child: DigiaSlot('hero_banner'),
)

Marketing name: "Inline Content" → DigiaSlot

Inheritance

Constructors

DigiaSlot(String placementKey, {Key? key, Widget? placeholder})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
placeholder → Widget?
Optional widget to display when no campaign content is active for this slot. Defaults to SizedBox.shrink when null.
final
placementKey → String
The placement key that identifies this slot in the Digia dashboard.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<DigiaSlot>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

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