fromValue static method

PrivacyStatus? fromValue(
  1. String? value
)

Parses PrivacyStatus from a raw value.

Implementation

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