ProgressRing class

Represents a single progress ring in the circular progress indicator.

Each ring displays progress as a ratio of current to goal values. The ring is rendered with the specified color and strokeWidth.

Constructors

ProgressRing({required double current, required double goal, required Color color, double strokeWidth = 12.0, Color? backgroundColor, double startAngle = -1.5707963267948966, StrokeCap capStyle = StrokeCap.round})
Creates a progress ring with current and goal values.
const

Properties

backgroundColor Color?
The background color of the ring (optional). If not provided, a semi-transparent version of color will be used.
final
capStyle StrokeCap
The style of the stroke cap. Default is StrokeCap.round for smooth rounded ends.
final
color Color
The color of the progress ring.
final
current double
The current progress value.
final
goal double
The goal or target value.
final
hashCode int
The hash code for this object.
no setterinherited
isGoalReached bool
Returns whether the goal has been reached or exceeded.
no setter
percentageInt int
Returns the percentage as a whole number (0 to 100).
no setter
progress double
Returns the progress percentage (0.0 to 1.0).
no setter
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startAngle double
The starting angle of the ring in radians. Default is -π/2 (top of the circle).
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
strokeWidth double
The width of the ring stroke.
final

Methods

copyWith({double? current, double? goal, Color? color, double? strokeWidth, Color? backgroundColor, double? startAngle, StrokeCap? capStyle}) ProgressRing
Creates a copy of this ring with optional new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited