fromCode static method

LokotroPayLanguage? fromCode(
  1. String code
)

Get language from code

Implementation

static LokotroPayLanguage? fromCode(String code) {
  try {
    return LokotroPayLanguage.values.firstWhere((lang) => lang.code == code);
  } catch (e) {
    return null;
  }
}