fromPrefix static method

PaymentMethodType? fromPrefix(
  1. String value
)

Implementation

static PaymentMethodType? fromPrefix(String value) {
  if (value.startsWith('bank_')) {
    return bank;
  } else if (value.startsWith('card_')) {
    return card;
  } else {
    return null;
  }
}