ExpandingArcTwoColorsLoader class
ExpandingArcTwoColorsLoader is a custom loader widget that displays two expanding arcs with different colors. The arcs gradually expand and contract in a smooth, continuous animation loop, while the loader itself rotates around its center, creating a dynamic visual effect.
Parameters:
- size: The size (width and height) of the loader widget. Must be greater than 0.
- strokeWidth: The thickness of the arcs' strokes. Must be greater than 0 and less than size / 3.
- color1: The color of the first arc. Default is
Colors.blue
. - color2: The color of the second arc. Default is
Colors.red
. - rotationDurationMs: Duration (in milliseconds) for a full rotation. Must be at least 500 ms. Default is 1000 ms.
- expansionDurationMs: Duration (in milliseconds) for the arcs to expand and contract. Must be at least 1000 ms. Default is 2000 ms.
Example Usage:
ExpandingArcTwoColorsLoader(
size: 48.0,
strokeWidth: 5.0,
color1: Colors.blue,
color2: Colors.red,
rotationDurationMs: 1000,
expansionDurationMs: 2000,
)
Assertions:
- size: Must be greater than 0.
- strokeWidth: Must be greater than 0 and less than size / 3.
- rotationDurationMs: Must be at least 500 milliseconds.
- expansionDurationMs: Must be at least 1000 milliseconds.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ExpandingArcTwoColorsLoader
Constructors
Properties
- color1 → Color
-
final
- color2 → Color
-
final
- expansionDurationMs → int
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- rotationDurationMs → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → double
-
final
- strokeWidth → double
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ExpandingArcTwoColorsLoader> -
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