flutterdartngx-international-phone-number

Keyboard appears and disappears automatically after focusing on widget


I am using widget called InternationalPhoneNumberInput() (which seems like TextField) to validate phone numbers.But when I focus on the widget, the keyboard appears and disappears automatically. You can see the widget code below.

Widget buildNumber(BuildContext context) {
PhoneNumber number = PhoneNumber(isoCode: 'TG');
List<String> county= ['TG'];
return
  InternationalPhoneNumberInput(
  keyboardAction: TextInputAction.next,
  onSubmit:()=> myFocusNodeEmail.requestFocus(),
  ignoreBlank: true,
  autoValidate: true,
  inputBorder: InputBorder.none,
  textStyle: TextStyle(
      fontFamily: "WorkSansSemiBold",
      fontSize: 16.0,
      color: Colors.black),
  countries: county,
  errorMessage: 'Numéro invalide',
  initialValue: number,
  hintText: 'Téléphone',
  focusNode: myFocusNodeTelephone,
  textFieldController: signupTelephoneController,

);}

Solution

  • Ohh yes!!I solved it simply by upgrading the widget from intl_phone_number_input: ^0.4.1+1 to intl_phone_number_input: ^0.4.2.It could help somebody else.