Skip to content
Open
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion lib/src/utils/phone_number.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class PhoneNumber extends Equatable {
if (prefix.isNotEmpty) {
prefix = prefix.startsWith('+') ? prefix : '+$prefix';
var country = Countries.countryList
.firstWhereOrNull((country) => country['dial_code'] == prefix);
.firstWhereOrNull((country) => prefix.contains(country['dial_code']);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing one more bracket at the end

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!, no need more brackets, what are you talking about?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at the end of 111

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh you are right!

if (country != null && country['alpha_2_code'] != null) {
return country['alpha_2_code'];
}
Expand Down