Home > OS >  I created a login form in flutter to connect in Mysql. But if I fill the username textfield. The pas
I created a login form in flutter to connect in Mysql. But if I fill the username textfield. The pas

Time:04-20

I created a login form in flutter to connect in Mysql. But if I fill the username textfield with data. The password textfield will also simultaneously fill with the same data I inputted on username textfield? How do I solve it? This is the codes.

  1. login.php codes

    enter image description here

  2. login_screen.dart codes

    https://drive.google.com/drive/folders/1y-BD1j59zX76gyYpS5rQhNn8DvjSTNQ5?usp=sharing

CodePudding user response:

It is because you have the same controller in both TextField

Just change The controller in the second TextField

For userName

TextField(
     controller: username,
),

For Password

TextField(
         controller: password,
    ),

CodePudding user response:

dont use same controller for TextField, create another controller for password TextField

  • Related