statusLabel method

String statusLabel(
  1. String actualValue, {
  2. String? fallback,
})

Returns the display label associated with a status value.

Implementation

String statusLabel(String actualValue, {String? fallback}) {
  final status = _config.statuses
      .where((item) => item.actualValue == actualValue)
      .firstOrNull;

  return status?.displayValue ?? fallback ?? actualValue;
}