RotatingTwoArcLoader class

RotatingTwoArcLoader is a custom loader widget that displays two rotating arcs that move in opposite directions. The outer arc rotates clockwise, and the inner arc rotates counterclockwise. Both arcs will animate indefinitely based on the specified rotation durations. This widget supports custom colors, arc sizes, stroke widths, and animation durations.

Parameters:

  • arcSize: The size (width and height) of the loader. Must be greater than 0.
  • arcWidth: The thickness of the arc stroke. Must be greater than 0 and less than arcSize/3.
  • rotationDurationOuterMilliseconds: Duration for the outer arc to complete one full rotation, in milliseconds. Must be at least 500 ms.
  • rotationDurationInnerMilliseconds: Duration for the inner arc to complete one full rotation, in milliseconds. Must be at least 500 ms.
  • outerArcColor: The color of the outer arc. Defaults to Colors.white.
  • innerArcColor: The color of the inner arc. Defaults to Colors.red.

Example Usage:

RotatingTwoArcLoader(
  arcSize: 48.0,
  arcWidth: 3.0,
  rotationDurationOuterMilliseconds: 2000,
  rotationDurationInnerMilliseconds: 1500,
  outerArcColor: Colors.blue,
  innerArcColor: Colors.orange,
)

Assertions:

  • arcSize: Must be greater than 0.
  • arcWidth: Must be greater than 0 and less than arcSize / 3.
  • rotationDurationOuterMilliseconds: Must be at least 500 milliseconds.
  • rotationDurationInnerMilliseconds: Must be at least 500 milliseconds.
Inheritance

Constructors

RotatingTwoArcLoader.new({Key? key, double arcSize = 48.0, double arcWidth = 3.0, int rotationDurationOuterMilliseconds = 1500, int rotationDurationInnerMilliseconds = 2000, Color outerArcColor = Colors.white, Color innerArcColor = const Color(0xFFFF3D00)})
const

Properties

arcSize double
final
arcWidth double
final
hashCode int
The hash code for this object.
no setterinherited
innerArcColor Color
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
outerArcColor Color
final
rotationDurationInnerMilliseconds int
final
rotationDurationOuterMilliseconds int
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() State<RotatingTwoArcLoader>
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