BalloonOverlay class

A widget that overlays animated balloons on top of its parent widget.

This widget uses a Stack to create balloons that float from the bottom of the screen to the top. The balloons are spawned at regular intervals, and their appearance, size, and animation duration are randomized.

Inheritance

Constructors

BalloonOverlay({Key? key, int? totalBalloons = 50, Duration spawnInterval = const Duration(milliseconds: 800), List<Color> colors = const [Colors.red, Colors.blue, Colors.green, Colors.orange, Colors.purple, Colors.yellow], double minSize = 60.0, double maxSize = 100.0, Duration minDuration = const Duration(seconds: 8), Duration maxDuration = const Duration(seconds: 12)})
const

Properties

colors List<Color>
A list of colors from which the balloons will be randomly colored.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxDuration Duration
The maximum duration for a balloon's animation from the bottom to the top.
final
maxSize double
The maximum size (diameter) for a balloon.
final
minDuration Duration
The minimum duration for a balloon's animation from the bottom to the top.
final
minSize double
The minimum size (diameter) for a balloon.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spawnInterval Duration
The time interval between spawning each balloon.
final
totalBalloons int?
The total number of balloons to spawn before the spawning stops. If null, balloons will be spawned indefinitely.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<BalloonOverlay>
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