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

Added support for eager autocompletion #61

Closed

Conversation

jyardin
Copy link

@jyardin jyardin commented Oct 12, 2021

Added a parameter autoCompletion in the MaskTextInputFormatter with two values:

  • MaskAutoCompletion.lazy: the current behaviour, where unfiltered characters are added once the following filtered character is input.
    Ex: with the mask "#/#", "1" then "2" output "1" then "1/2"
  • MaskAutoCompletion.eager: the new behaviour, where unfiltered characters are added when the previous filtered character is input.
    Ex: with the mask "#/#", "1" then "2" output "1/" then "1/2"

This fixes #44

@politebarista
Copy link

Thank you so much for your tweaking! Maybe you should erase the last character entered by the user, instead of jumping to the last character when you press backspace

@samuele-besoli-mndl
Copy link

When will we have this new update?

@scopendo
Copy link

Thank you for this @jyardin – I'm updating my pubspec.yaml to refer to your branch whilst this PR remains open.

@siqwin – I wonder if it is worth seeing if @fluttercommunity would like to take over the maintenance of this project. Your input formatter-based approach to masked input is superior in my opinion to other packages that introduce a custom text editing controller or alternative to TextField/TextFormField.

@siqwin
Copy link
Owner

siqwin commented Jan 19, 2022

Thanks

@siqwin siqwin closed this Jan 19, 2022
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

Successfully merging this pull request may close these issues.

Support eager formatting
5 participants