DefaultLegendEllipsisBuilder class

A convenience object that creates legend ellipsis for SegmentedBarLegend.

Example:

PrimerProgressBar(
  segments: segments,
  legendEllipsisBuilder: DefaultLegendEllipsisBuilder(
    segments: segments,
    color: Colors.grey,
    label: const Text("Other"),
    valueLabelBuilder: (value) => Text("$value%"),
  ),
);

Constructors

DefaultLegendEllipsisBuilder({required List<Segment> segments, required Color color, Text? label, ValueLabelBuilder? valueLabelBuilder})
Creates a callable object that can be used as SegmentedBarLegend.ellipsisBuilder.
const

Properties

color Color
Color for the ellipsis.
final
hashCode int
The hash code for this object.
no setterinherited
label Text?
Text used as the label of the ellipsis.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
segments List<Segment>
All segments displayed in the SegmentedBar.
final
valueLabelBuilder ValueLabelBuilder?
Callback that creates a value label for the ellipsis.
final

Methods

call(int truncatedItemCount) LegendItem
Creates a LegendItem ellipsis from the number of overflowed items.
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