Glitters class
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
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Glitters
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
- Glitters.icon({Key? key, double? minSize, double? maxSize, Duration? duration, Duration? inDuration, Duration? outDuration, Duration? interval, Duration delay = Duration.zero, Color? color, double? maxOpacity, required IconData icon})
-
Creates a widget that fades icons in and out one by one inside itself.
const
- Glitters.widget({Key? key, double? minSize, double? maxSize, Duration? duration, Duration? inDuration, Duration? outDuration, Duration? interval, Duration delay = Duration.zero, double? maxOpacity, required Widget child})
-
Creates a widget that fades widgets in and out one by one inside itself.
const
Properties
- child → Widget?
-
The widget to use instead of the predefined glitter shape.
final
- 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.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData?
-
The icon data to use instead of the predefined glitter shape.
final
- 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.
finalinherited
- 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.
no setterinherited
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.
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}) → 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