Glitters class Null safety

A widget that fades in and out glitter-like shapes one by one inside itself.

The size of the widget itself is calculated using the constraints obtained by LayoutBuilder, and glitters are randomly positioned within the area. An error occurs if the widget is unconstrained.

Only a single glitter is shown at a time. Stack multiple glitters with GlitterStack to display them concurrently.

Inheritance

Constructors

Glitters({Key? key, double? minSize, double? maxSize, Duration? duration, Duration? inDuration, Duration? outDuration, Duration? interval, Duration delay = Duration.zero, Color? color, double? maxOpacity})
Creates a widget that fades in and out glitter-like shapes one by one. [...]
const

Properties

color Color?
The main color of glitters.
final
delay Duration
The duration of the wait before animation starts.
final
duration Duration?
The duration in which a glitter is shown with the maximum opacity. This does not include the durations of fade-in/out and the interval between glitters.
final
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
inDuration Duration?
The duration over which a glitter fades in.
final
interval Duration?
The duration of the wait between a glitter and the next.
final
key Key?
Controls how one widget replaces another widget in the tree. [...]
final, inherited
maxOpacity double?
The maximum opacity that a glitter fades in up to and out from.
final
maxSize double?
The maximum size of a glitter shown inside the widget.
final
minSize double?
The minimum size of a glitter shown inside the widget.
final
outDuration Duration?
The duration over which a glitter fades out.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
inherited
createState() → _GlittersState
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. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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}) 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. [...]
@nonVirtual, inherited