SegmentLinearIndicator class

A multi-segment linear progress indicator that displays three segments with different colors and styles. One segment can optionally display stripes.

The total of all segments must be less than or equal to 1.0 (100%). Each segment percentage must be between 0.0 and 1.0.

Example:

MultiSegmentLinearIndicator(
  segments: [
    SegmentLinearIndicator(percent: 0.3, color: Colors.red, enableStripes: true),
    SegmentLinearIndicator(percent: 0.4, color: Colors.blue),
    SegmentLinearIndicator(percent: 0.3, color: Colors.green),
  ],
  lineHeight: 20,
  barRadius: Radius.circular(10),
  animation: true,
  enableStripes: [1, 2], // Enable stripes for first and second segments
)

Represents a segment in the linear indicator with a percentage and color.

Constructors

SegmentLinearIndicator.new({required double percent, required Color color, bool enableStripes = false})

Properties

color Color
final
enableStripes bool
final
hashCode int
The hash code for this object.
no setterinherited
percent double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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