setCountryCode method

void setCountryCode(
  1. String? countryCode
)

Sets the country code. Used to change currency units. eg: "US", "NP", "IN" etc.

Implementation

void setCountryCode(String? countryCode) {
  /// validate if it mathes the example format.
  if (countryCode != null && countryCode.length != 2) {
    throw Exception('Country code should be of 2 characters');
  }
  _countryCode = countryCode;
}