CelebrationMessageOptions class

Text banner layered over full-screen particle celebration.

Pass to ConfettiEngine.celebrate as overlayMessage, or build via CelebrationMessageOptions.withDefaults.

Annotations

Constructors

CelebrationMessageOptions({required String message, bool showMessage = true, Alignment alignment = Alignment.bottomCenter, EdgeInsets outerPadding = const EdgeInsets.fromLTRB(24, 0, 24, 56), TextAlign textAlign = TextAlign.center, TextStyle? style, BoxDecoration? decoration, EdgeInsets innerPadding = const EdgeInsets.symmetric(horizontal: 16, vertical: 10), int? durationInSeconds})
Creates message styling for the overlay.
const
CelebrationMessageOptions.withDefaults(String message, {bool showMessage = true, Alignment alignment = Alignment.bottomCenter, EdgeInsets outerPadding = const EdgeInsets.fromLTRB(24, 0, 24, 56), TextAlign textAlign = TextAlign.center, TextStyle? style, BoxDecoration? decoration, EdgeInsets innerPadding = const EdgeInsets.symmetric(horizontal: 16, vertical: 10), int? durationInSeconds})
Copy with common defaults for a celebratory line (like pub examples).
factory

Properties

alignment Alignment
Where to anchor the padded text block in the overlay Stack.
final
decoration BoxDecoration?
Optional background / border around the label (e.g. rounded frosted bar).
final
durationInSeconds int?
When non-null, the entire overlay (confetti + message) is dismissed after this many seconds at minimum 1 (clamped to 3600 in the engine). If particles finish earlier, the overlay still closes then.
final
effectiveMessage String
Effective trimmed message — empty means “don’t paint text”.
no setter
hashCode int
The hash code for this object.
no setterinherited
innerPadding EdgeInsets
Padding inside decoration; ignored when decoration is null.
final
message String
Banner text (emojis allowed).
final
outerPadding EdgeInsets
Space around the text (or decorated container) inside the alignment slot.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldPaintText bool
Whether the engine should paint a text layer.
no setter
showMessage bool
When false, no text widget is built (confetti only).
final
style TextStyle?
Typographic style; defaults to a white, shadowed title in the engine host.
final
textAlign TextAlign
Paragraph alignment inside Text.
final

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