Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions lib/src/country_code.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down