setCountry method

  1. @override
Future<void> setCountry(
  1. CountryCode country
)
override

Sets the available methods to be accounted as the provided country.

Implementation

@override
Future<void> setCountry(CountryCode country) async {
  Log.debug('setCountry($country)', '$runtimeType');

  if (isClosed || me.isLocal) {
    return;
  }

  _country = country;

  // TODO: Might replace currencies when local ones are supported.
  _currency = Currency(switch (country.val) {
    (_) => 'USD',
  });

  await _queryMethods();
}