ConditionalFormat.iconSet constructor
ConditionalFormat.iconSet(
- IconSetType iconSet, {
- bool reverse = false,
- bool showValue = true,
- List<
double> ? thresholds,
An icon set, a small icon (arrows, traffic lights, ratings, ...) drawn in each cell according to where its value falls in the range.
thresholds give the percentage cut-off for each icon (the first is
always 0); when omitted they default to an even split for the set's icon
count. reverse flips the icon order (e.g. red↔green) and showValue
toggles whether the cell's value stays visible next to the icon.
Implementation
factory ConditionalFormat.iconSet(
IconSetType iconSet, {
bool reverse = false,
bool showValue = true,
List<double>? thresholds,
}) {
final (name, count) = _iconSetInfo(iconSet);
return ConditionalFormat._(
typeName: 'iconSet',
iconSetName: name,
iconReverse: reverse,
iconShowValue: showValue,
iconThresholds: thresholds ?? _defaultIconThresholds(count),
);
}