fromKey static method

PeachPaymentMethod? fromKey(
  1. String key
)

Looks up a payment method by its key. Returns null for unknown keys or methods without a bundled logo (e.g. samsung_pay).

Implementation

static PeachPaymentMethod? fromKey(String key) {
  for (final method in values) {
    if (method.key == key) return method;
  }
  return null;
}