findOneByCountryCode method

Future<MatexCountryMetadata?> findOneByCountryCode(
  1. String countryCode
)

Fetches metadata for a country with the given country code.

Implementation

Future<MatexCountryMetadata?> findOneByCountryCode(String countryCode) {
  countryCode = countryCode.toLowerCase();

  return MatexCountryBloc.instance.findOne(
    filter: (country) => country.code.toLowerCase() == countryCode,
  );
}