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

Remove mask to do a Request IDEA #43

Open
lffspaniol opened this issue Oct 14, 2019 · 3 comments
Open

Remove mask to do a Request IDEA #43

lffspaniol opened this issue Oct 14, 2019 · 3 comments

Comments

@lffspaniol
Copy link

i'm start programing flutter 2 days ago, this is a cool project but if i need to remove the mask to do a request, the text is seted to ""

  static String maskCnpj = "00.000.000/0000-00";
  final _cnpj = MaskedTextController(mask: maskCnpj);
  final _user = TextEditingController();
  final _password = TextEditingController();
  void onClick() {
    print("potato");
    if (_formkey.currentState.validate()) {
      print(_cnpj.text); //out 12.345.678/9101-11
      print(_user.text);
      print(_password.text);
    }
  }

i try remove mask with .updateMask("") but this clean the field; ok : Im noob.
after the i remove the mask with .updateMask("00000000000000") <- THIS WORKS BUT is not cool

  static String maskCnpj = "00.000.000/0000-00";
  final _cnpj = MaskedTextController(mask: maskCnpj);
  final _user = TextEditingController();
  final _password = TextEditingController();
  void onClick() {
    print("potato");
    if (_formkey.currentState.validate()) {
      _cnpj.updateMask("00000000000000");
      print(_cnpj.text); 
      _cnpj.updateMask(maskCnpj);
      print(_user.text);
      print(_password.text);
    }
  }

maybe add a var.textNoMask will be awesome

tansk's for attention

@ciceropablo
Copy link

I have the same problem. @benhurott, any news or tip?

@git-xbits
Copy link

Same here

@lramondev
Copy link

Same

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

4 participants