currentCountry property

String? currentCountry

Returns best possible country code based on currentLocale and deviceLocale.

Implementation

String? get currentCountry =>
    currentLocale.countryCode ??
    (_locale == null
            ? deviceLocale
            : deviceLocales.firstWhere(
                (element) => locale.startsWith(element.languageCode),
                orElse: () => deviceLocale))
        .countryCode;