Confetti class

Inheritance

Constructors

Confetti.new({Key? key, ConfettiOptions? options, ParticleBuilder? particleBuilder, required ConfettiController controller, dynamic onFinished()?, bool instant = false, bool enableCustomScheduler = false})
const

Properties

controller ConfettiController
The controller of the confetti. in general, you don't need to provide one.
final
enableCustomScheduler bool
If true, the confetti will use a timer to schedule the confetti, it is useful when you want to keep the speed of the confetti constant on every device with different refresh rates.
final
hashCode int
The hash code for this object.
no setterinherited
instant bool
if true, the confetti will be launched instantly as soon as it is created. the default value is false.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onFinished → dynamic Function()?
A callback that will be called when the confetti finished its animation.
final
options ConfettiOptions?
The options used to launch the confetti.
final
particleBuilder ParticleBuilder?
A builder that creates the particles. if you don't provide one, a default one will be used. the default particles are circles and squares.
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<Confetti>
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

Static Methods

launch(BuildContext context, {required ConfettiOptions options, ParticleBuilder? particleBuilder, dynamic insertInOverlay(OverlayEntry overlayEntry)?, dynamic onFinished(OverlayEntry overlayEntry)?, bool enableCustomScheduler = false}) ConfettiController
A quick way to launch the confetti. Notice: If your APP is not using the MaterialApp as the root widget, you can't use this method. Instead, you should use the Confetti widget directly. context is the context of the APP. options is the options used to launch the confetti. particleBuilder is the builder that creates the particles. if you don't provide one, a default one will be used.The default particles are circles and squares.. onFinished is a callback that will be called when the confetti finished its animation. insertInOverlay is a callback that will be called to insert the confetti into the overlay. enableCustomScheduler is a flag that indicates whether to use a custom scheduler. If true, the confetti will use a timer to schedule the confetti, it is useful when you want to keep the speed of the confetti constant on every device with different refresh rates.