Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to select country based on location #32

Open
lohithkumar95 opened this issue Jul 8, 2020 · 0 comments
Open

unable to select country based on location #32

lohithkumar95 opened this issue Jul 8, 2020 · 0 comments

Comments

@lohithkumar95
Copy link

lohithkumar95 commented Jul 8, 2020

i am using gelocator plugin to get the current location. So, based on that i need to make the initialSelection corresponding to the location countryISO. But when i tried its not updating.

Can i know what could be wrong?
Below is my code to set the initialSelection.

 List<Placemark> p = await geolocator.placemarkFromCoordinates(
          _currentPosition.latitude, _currentPosition.longitude);
      Placemark place = p[0];
      setState(() {
        countryCode = place.isoCountryCode;
      });
InternationalPhoneInput(
             onPhoneNumberChange: _onPhoneNumberChanged,
             initialSelection: countryCode,
             errorText:"Please type a valid phone number",
             errorMaxLines:4,
           ),);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant