diff --git a/lib/src/country_code.dart b/lib/src/country_code.dart index 069f0e8..2d238e0 100644 --- a/lib/src/country_code.dart +++ b/lib/src/country_code.dart @@ -83,10 +83,17 @@ class CountryCode { ); } + static const String _lrm = '\u200E'; + String get _dialCodeLTR { + final dc = dialCode ?? ''; + if (dc.isEmpty) return dc; + return '$_lrm$dc$_lrm'; + } + @override - String toString() => "$dialCode"; + String toString() => _dialCodeLTR; - String toLongString() => "$dialCode ${toCountryStringOnly()}"; + String toLongString() => "$_dialCodeLTR ${toCountryStringOnly()}"; String toCountryStringOnly() { return '$_cleanName';