Coder Social home page Coder Social logo

Comments (5)

natintosh avatar natintosh commented on July 2, 2024 1

Oh that's true I'll work on that for the next update. Big thanks πŸ‘Š

from intl_phone_number_input.

natintosh avatar natintosh commented on July 2, 2024

On the latest version of the package you can now pass a TextEditingController as a parameter.

To set/change the value of the textField you could always do

setState(){
 _yourControllerReference.text = 'what ever value you want set'
}

Don't Forget to set your controller reference on the highlighted argument

InternationalPhoneNumberInput({
    Key key,
    @required this.onInputChanged,
    this.onInputValidated,
    this.focusNode,
    **this.textFieldController,**
    this.onSubmit,
    this.keyboardAction,
    this.countries,
    this.inputBorder,
    this.inputDecoration,
    this.initialCountry2LetterCode = 'NG',
    this.hintText = '(800) 000-0001 23',
    this.shouldParse = true,
    this.shouldValidate = true,
    this.formatInput = true,
    this.errorMessage = 'Invalid phone number',
  })

I hope this help

from intl_phone_number_input.

dungnv2602 avatar dungnv2602 commented on July 2, 2024

On the latest version of the package you can now pass a TextEditingController as a parameter.

To set/change the value of the textField you could always do

setState(){
 _yourControllerReference.text = 'what ever value you want set'
}

Don't Forget to set your controller reference on the highlighted argument

InternationalPhoneNumberInput({
    Key key,
    @required this.onInputChanged,
    this.onInputValidated,
    this.focusNode,
    **this.textFieldController,**
    this.onSubmit,
    this.keyboardAction,
    this.countries,
    this.inputBorder,
    this.inputDecoration,
    this.initialCountry2LetterCode = 'NG',
    this.hintText = '(800) 000-0001 23',
    this.shouldParse = true,
    this.shouldValidate = true,
    this.formatInput = true,
    this.errorMessage = 'Invalid phone number',
  })

I hope this help

Yeah I know that, but the thing is when you doing that the format of phone number in text field is broken

from intl_phone_number_input.

dungnv2602 avatar dungnv2602 commented on July 2, 2024

Thank you.

from intl_phone_number_input.

natintosh avatar natintosh commented on July 2, 2024

Hi @dungnv2602 I've just made changes and push the update. You can now upgrade your dart package

from intl_phone_number_input.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.