progress<T> static method

ReadableColumn<T> progress<T>(
  1. String label, {
  2. required double value(
    1. T v
    ),
  3. double? width = 150,
  4. bool sortable = true,
})

A 0..1 ratio shown as a labelled progress bar.

Implementation

static ReadableColumn<T> progress<T>(
  String label, {
  required double Function(T v) value,
  double? width = 150,
  bool sortable = true,
}) =>
    ReadableColumn<T>(
      label,
      type: ReadableColumnType.progress,
      width: width,
      sortable: sortable,
      sortKey: (v) => value(v),
      cell: (ctx, v) => ReadableCells.progress(value(v)),
    );