fromWire static method

LokotroPaymentMethodFlag fromWire(
  1. String? value
)

Parse a wire value (snake_case) into the typed enum. Unknown values fall back to LokotroPaymentMethodFlag.none.

Implementation

static LokotroPaymentMethodFlag fromWire(String? value) {
  if (value == null || value.isEmpty) return LokotroPaymentMethodFlag.none;
  for (final flag in LokotroPaymentMethodFlag.values) {
    if (flag.wireValue == value) return flag;
  }
  return LokotroPaymentMethodFlag.none;
}