title: Flutter change password
body: <p>I want to make a change password in my app using mysql but i dont know how to get the specific logged in id to change my password i have a dash board i am using cards on it so when i click the card with a name change password it will redirect
  to this page i am using a mysql for my localdatabase.</p>
  <pre><code> Widget build(BuildContext context) {
          return Scaffold(
            resizeToAvoidBottomInset: false,
            appBar: AppBar(
              title: Text('Change Password'),
              backgroundColor: Color(0xff083663),
            ),
            body: Form(
              key: _key,
              child: Center(
                child: Column(
                  children: &lt;Widget&gt;[
                    SizedBox(
                      height: 30.0,
                    ),
                    Padding(
                      padding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 16.0),
                      child: Container(
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.center,
                          children: &lt;Widget&gt;[
                            Text(
                              'Change Password',
                              style: TextStyle(
                                  fontSize: 18.0, fontWeight: FontWeight.w900),
                            )
                          ],
                        ),
                      ),
                    ),
                    SizedBox(
                      height: 10.0,
                    ),
  </code></pre>
  <p>//This is the field where you will enter the Current Password</p>
  <pre><code>  Padding(
              padding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 16.0),
              child: TextFormField(
                validator: (e) {
                  if (e.isEmpty) {
                    return &quot;Please Enter Current Password&quot;;
                  }
                  return null;
                },
                obscureText: _secureText1,
                onSaved: (e) =&gt; c1 = e,
                decoration: InputDecoration(
                    labelText: 'Current Password',
                    suffixIcon: IconButton(
                      onPressed: showHide,
                      icon: Icon(_secureText1
                          ? Icons.visibility_off
                          : Icons.visibility),
                    ),
                    enabledBorder: OutlineInputBorder(
                        borderSide: BorderSide(
                      color: Color(0xff083663),
                    )),
                    border: OutlineInputBorder()),
              ),
            ),
            SizedBox(
              height: 10.0,
            ),
            Padding(
              padding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 16.0),
              child: TextFormField(
                validator: (e) {
                  if (e.isEmpty) {
                    return &quot;Please Enter New Password&quot;;
                  }
                  return null;
                },
                obscureText: _secureText2,
                onSaved: (e) =&gt; c2 = e,
                decoration: InputDecoration(
                    labelText: 'New Password',
                    suffixIcon: IconButton(
                      onPressed: showHide2,
                      icon: Icon(_secureText2
                          ? Icons.visibility_off
                          : Icons.visibility),
                    ),
                    enabledBorder: OutlineInputBorder(
                        borderSide: BorderSide(
                      color: Color(0xff083663),
                    )),
                    border: OutlineInputBorder()),
              ),
            ),
  </code></pre>
  <p>// this is the field for the verify password</p>
  <pre><code>  Padding(
                      padding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 16.0),
                      child: TextFormField(
                        validator: (e) {
                          if (e.isEmpty) {
                            return &quot;Verify Password&quot;;
                          }
                          return null;
                        },
                        onSaved: (e) =&gt; c3 = e,
                        keyboardType: TextInputType.number,
                        decoration: InputDecoration(
                            labelText: 'Verify Password',
                            suffixIcon: IconButton(
                              onPressed: showHide3,
                              icon: Icon(_secureText3
                                  ? Icons.visibility_off
                                  : Icons.visibility),
                            ),
                            enabledBorder: OutlineInputBorder(
                                borderSide: BorderSide(
                              color: Color(0xff083663),
                            )),
                            border: OutlineInputBorder()),
                      ),
                    ),
                    Padding(
                      padding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 16.0),
                      child: Divider(),
                    ),
                    SizedBox(
                      height: 20.0,
                    ),
                    Container(
                      height: 50,
                      width: 250,
                      child: RaisedButton(
                        onPressed: () {
                          check();
                        },
                        color: Color(0xffb5171d),
                        shape: RoundedRectangleBorder(
                            borderRadius: BorderRadius.all(Radius.circular(30.0))),
                        textColor: Colors.white,
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.center,
                          children: &lt;Widget&gt;[
                            Icon(
                              Icons.vpn_key,
                              color: Colors.white,
                            ),
                            Text(
                              'Save Changes',
                              style: TextStyle(fontSize: 15),
                            ),
                            SizedBox(
                              height: 20,
                            )
                          ],
                        ),
                      ),
                    ),
                  ],
                ),
              ),
            ),
          );
        }
      }
  </code></pre>