我刚学过Flutter 翼.这里我想问一下如何匹配密码和确认密码.在这里我会给出我的密码.我还使用TextField.我在这里不使用验证器来验证
TextField(
key: passkey,
style: new TextStyle(color: Colors.white),
controller: password,
decoration: InputDecoration(
labelText: 'Password',
labelStyle: TextStyle(color: Colors.white),
hintStyle: TextStyle(color: Colors.white),
icon: const Padding(
padding: const EdgeInsets.only(top: 15.0),
child: const Icon(
Icons.lock_outline,
color: Colors.white,
)
),
errorText: validate ? 'Password Can\'t Be Empty' : null,
),
obscureText: _obscureText,
),
TextField(
style: new TextStyle(color: Colors.white),
controller: confirmpassword,
decoration: InputDecoration(
labelText: 'Retype Password',
labelStyle: TextStyle(color: Colors.white),
hintStyle: TextStyle(color: Colors.white),
icon: const Padding(
padding: const EdgeInsets.only(top: 15.0),
child: const Icon(
Icons.lock_outline,
color: Colors.white,
)),
// errorText:
// validate ? 'Password Can\'t Be Empty' : null,
),
obscureText: _obscureText,
),