natintosh / intl_phone_number_input

MIT License
164 stars 496 forks source link

get more info phone numbers when onInputChanged #349

Open khlewesamer opened 1 year ago

khlewesamer commented 1 year ago

thanx for this amazing plugin :)

I have suggestoin to get more data about phone numbers when onInputChanged, I modify PhoneNumber to be like this :

  PhoneNumber({
    this.phoneNumber,
    this.dialCode,
    this.isoCode,
    this.countryName,
    this.flagEmoji
  }) : _hash = 1000 + Random().nextInt(99999 - 1000);

then in input_widget pass these attrs like this:

PhoneNumber(
                phoneNumber: phoneNumber,
                isoCode: this.country?.alpha2Code,
                dialCode: this.country?.dialCode,
                countryName: this.country?.name,
                flagEmoji: Utils.generateFlagEmojiUnicode(this.country?.alpha2Code ?? '')
            ));

again thanks for this plugin I hope u add it in the next update