TapParticle class
A TapParticle display particles when push button. If syncAnimation is set, display particles according to it.
{@tool snippet} This example shows how to create the button that can display particle.
final controller = AnimationController(
vsync: this,
duration: Duration(milliseconds: 300),
lowerBound: 0.0,
upperBound: 1.0,
);
TapParticle(
size: 50,
particleCount: 5,
color: Colors.red,
syncAnimation: controller,
duration: const Duration(milliseconds: 500),
child: TapFillIcon(
animationController: controller,
borderIcon: const Icon(
Icons.star_border,
color: Colors.grey,
size: 50,
),
fillIcon: const Icon(
Icons.star,
color: Colors.yellow,
size: 50,
),
initialPushed: false,
),
),
{@end-tool}
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TapParticle
Constructors
- TapParticle({double size = 50, Widget? child, AnimationController? syncAnimation, AnimationController? controller, int particleCount = 8, Duration duration = const Duration(milliseconds: 500), double? particleLength, Color color = Colors.yellow, Key? key})
-
const
Properties
- child → Widget?
-
The widget in the center of a particle.
final
- color → Color
-
The color of particles.
final
- controller → AnimationController?
-
The animation controller for controlling the particle animation.
final
- duration → Duration
-
The animation's duration.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- particleCount → int
-
The number of particle lines.
The particles display in a circle.
final
- particleLength → double?
-
The maximum length of a particle.
Particles are to this length when the animation value is just half.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → double
-
The size of child in this object.
It display empty space of the size.
final
- syncAnimation → AnimationController?
-
The Animation for synchronizing the particle animation.
The particle animation is starting
when syncAnimation called forward method.
If syncAnimation called reverse method,
the particle animation reset animation.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → TapParticleState -
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