enumBadge<T> static method
A coloured status/type pill drawn from a small enum-like set. color
maps the string to a swatch; falls back to a neutral pill.
Implementation
static ReadableColumn<T> enumBadge<T>(
String label, {
required String Function(T v) value,
Color Function(String tag)? color,
double? width = 132,
bool sortable = true,
}) =>
ReadableColumn<T>(
label,
type: ReadableColumnType.enumBadge,
width: width,
sortable: sortable,
sortKey: (v) => value(v),
cell: (ctx, v) => ReadableCells.badge(value(v), color: color),
);