byDialCode static method

Country? byDialCode(
  1. String code
)

Country by dial/calling code (e.g. '1' for +1). Returns null if not found.

Implementation

static Country? byDialCode(String code) =>
    _all.firstWhereOrNull((c) => c.callingCodes.contains(code));