fromValue static method

LikeStatus fromValue(
  1. String? value
)

Parses LikeStatus from a raw value.

Implementation

static LikeStatus fromValue(String? value) {
  if (value == null) return LikeStatus.INDIFFERENT;
  return LikeStatus.values.firstWhere(
    (e) => e.value == value,
    orElse: () => throw FormatException('Invalid value: $value'),
  );
}