CountryCode.fromDialCode constructor

CountryCode.fromDialCode(
  1. String dialCode
)

Implementation

factory CountryCode.fromDialCode(String dialCode) {
  final Map<String, String>? jsonCode = codes.firstWhereOrNull(
    (code) => code['dial_code'] == dialCode,
  );
  return CountryCode.fromJson(jsonCode!);
}