time<T> static method

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

A 24-hour HH:mm time (monospace).

Implementation

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