Pulsator class

Pulsator widget that renders pulsating circles.

The widget can be configured to render a given number of pulsating circles with a given style.

The count property controls the number of circles rendered at a time.

The duration property controls the duration of a single pulse animation.

The repeat property controls the number of times the animation will repeat. If 0, the animation will repeat forever.

The startFromScratch property controls if the animation should start from the beginning.

The autoStart property controls if the animation should start automatically when the widget is created.

The fit property controls how the pulse should be scaled to fit the widget size. The onCreated callback is invoked when the animation controller is created.

The onCompleted callback is invoked when the animation is completed.

The child property is the child of the widget that is rendered on top of the pulses.

Inheritance

Constructors

Pulsator({required PulseStyle style, int count = 3, Duration duration = const Duration(seconds: 2), int repeat = 0, bool startFromScratch = true, bool autoStart = true, PulseFit fit = PulseFit.contain, OnCreatedListener? onCreated, VoidCallback? onCompleted, Widget? child, Key? key})
Make a new Pulsator instance.
const

Properties

autoStart bool
Whether the animation should start automatically when the widget is created. Default is true.
final
child Widget?
The child of the widget that is rendered on top of the pulses.
final
count int
Number of pulses visible at a time. Default is 3.
final
duration Duration
Duration of a single pulse animation. Default is 2 seconds.
final
fit PulseFit
How the pulse should be scaled to fit the widget size. Default is PulseFit.contain.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onCompleted VoidCallback?
Invoked when the animation is completed.
final
onCreated OnCreatedListener?
Invoked when the animation controller is created.
final
repeat int
Number of times pulses will repeat. If 0, pulses will repeat forever. Default is 0.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startFromScratch bool
Whether the animation should start from the beginning. Default is true.
final
style PulseStyle
Pulse style configuration.
final

Methods

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