Skip to main content

Progress Column

FdcProgressColumn renders numeric values as compact progress indicators. It is ideal for completion percentages, quality metrics, utilization, and similar progress-like signals.

Use it when the relative position inside a known range matters more than exact numeric editing. If users must enter or compare precise amounts, pair the same field with a decimal column elsewhere or use a numeric column instead.

Progress column sample
Loading FDC sample…
FdcGrid(
dataSet: projectRows,
options: const FdcGridOptions(readOnly: true),
columns: [
const FdcTextColumn(fieldName: 'project', width: 180),
FdcProgressColumn(
fieldName: 'completion',
width: 180,
progressMax: 100,
progressTextBuilder: (value) => '${(value ?? 0).round()}%',
),
FdcProgressColumn(
fieldName: 'quality',
width: 180,
progressTextBuilder: (value) => '${(value ?? 0).toStringAsFixed(1)}%',
),
],
);

Key characteristics

  • Read-only by design.
  • Accepts integer or decimal values.
  • Supports progressMin, progressMax, progressTextBuilder, and optional style overrides.

Example

FdcProgressColumn<dynamic>(
fieldName: 'completion',
progressMax: 100,
progressTextBuilder: (value) => '${(value ?? 0).round()}%',
)

Range normalization

progressMin and progressMax define the visual range. Values are normalized between those bounds and clamped for display, so an out-of-range source value does not overflow the progress track. The underlying dataset value is not modified.

FdcProgressColumn<dynamic>(
fieldName: 'utilization',
progressMin: 0,
progressMax: 1,
progressTextBuilder: (value) =>
'${((value ?? 0) * 100).round()}%',
)

Field compatibility and behavior

The column accepts FdcIntegerField and FdcDecimalField. It is inherently read-only, but still participates in normal row navigation, sorting, filtering, summaries, export policy, and styling where those features are enabled.

Use progressTextBuilder to keep the displayed label aligned with domain units. Use progressStyle for per-column visual overrides; broader defaults belong in the grid theme.