getLocalCountryCode static method

Future<String> getLocalCountryCode({
  1. String onNotFound()?,
})

Get county code from local timezone.

Throws an CountryNotFoundException if the country code could not found and onNotFound is null.

Implementation

static Future<String> getLocalCountryCode({
  String Function()? onNotFound,
}) async {
  final local = await FlutterTimezone.getLocalTimezone();
  return getCountryCode(local, onNotFound: onNotFound);
}