CirclifyItem class
Represents a single segment in a Circlify chart.
Each item has a value that determines its proportional size in the chart, a color for rendering, and an optional label displayed on the segment.
The id is used for animation diffing - items with the same id will animate smoothly when their values change.
Example:
CirclifyItem(
id: 'sales',
color: Colors.blue,
value: 42.0,
label: '42%',
)
Constructors
- CirclifyItem({String? id, required Color color, required double value, String? label})
- Creates a chart item with the given properties.
Properties
- color → Color
-
The color of the segment.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The id of the item, required for correctly updating the item.
final
- label → String?
-
The label displayed on the center of the segment.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → double
-
The value of the item, must be greater than 0.
final
Methods
-
copyWith(
{Color? color, double? value, String? label}) → CirclifyItem - Creates a copy of this item with the given fields replaced.
-
copyWithLabel(
String? label) → CirclifyItem - Creates a copy with explicitly setting the label (can be null).
-
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