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

How to get selected country code is +971 #65

Open
3 of 7 tasks
Sumit258000 opened this issue Jul 1, 2024 · 0 comments
Open
3 of 7 tasks

How to get selected country code is +971 #65

Sumit258000 opened this issue Jul 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Sumit258000
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Package/Plugin version

2.0.1

Platforms

  • Android
  • iOS
  • Linux
  • MacOS
  • Web
  • Windows

Flutter doctor

[√] Flutter (Channel stable, 3.19.2, on Microsoft Windows [Version 10.0.22621.3737], locale en-AE)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
X cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.36)
[√] Android Studio (version 2024.1)
[√] Connected device (4 available)
[√] Network resources

! Doctor found issues in 1 category.

Minimal code example

 FormBuilderPhoneField(
                          name: 'phone_number_cupertino',
                          isCupertinoPicker: true,
                          decoration: const InputDecoration(
                            labelText: 'Phone Number',
                            hintText: 'Hint',
                          ),
                          // onChanged: _onChanged,
                          priorityListByIsoCode: const ['US'],
                          validator: FormBuilderValidators.compose([
                            FormBuilderValidators.numeric(),
                            FormBuilderValidators.required(),
                          ]),
                        ),

Current Behavior

Currently when I call _formKey.currentState!.value["phone_number_cupertino"] it only give phone_number not country code which +971. How can I get selected country code?

Expected Behavior

It should give country code attached with phoneNumber

Steps To Reproduce

 FormBuilderPhoneField(
                          name: 'phone_number_cupertino',
                          isCupertinoPicker: true,
                          decoration: const InputDecoration(
                            labelText: 'Phone Number',
                            hintText: 'Hint',
                          ),
                          // onChanged: _onChanged,
                          priorityListByIsoCode: const ['US'],
                          validator: FormBuilderValidators.compose([
                            FormBuilderValidators.numeric(),
                            FormBuilderValidators.required(),
                          ]),
                        ),

Aditional information

No response

@Sumit258000 Sumit258000 added the bug Something isn't working label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant