Textfield validation in flutter


Joined
Jan 29, 2022
Messages
6
Reaction score
0
Working with flutter and dart project.Navigating from prev to next screen and then fetching some info of previous screen and then comes the textfield where need to validate number of characters to enter and button enable disable its easy but confusing in my project please help ..
 
Ad

Advertisements

Joined
Jan 29, 2022
Messages
6
Reaction score
0
can elaborate more on this?


Are you able to pass data from previous screen to next screen?



Noo as I have screen where there is card(visacard) on that nickname is there eg abc so i have one textbutton change nickname so from that i'm navigating to next screen which is change nickname screen now there is textformfield where i can see ABC name of card already there and the there is textbutton which should be disable so now i can update name with min 15 characters and button gets enable so that name will update to previous screen on that card the name will change that what i want to implement can you please help me
 
Joined
Apr 25, 2017
Messages
222
Reaction score
28
You can return the name from Change NickName Screen to PreviousScreen, then use setState to refresh the page.

PreviousScreen

Java:
Navigator.pushNamed(context, ChangeNickName.ROUTE,arguments: name).then((onValue){
  setState(() {
          onValue = name;
      });
 
Ad

Advertisements

Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top