forked from eatvio/eatvio_app
feat(auth): password visibility
This commit is contained in:
@@ -37,6 +37,7 @@ class AuthScreen extends StatefulWidget {
|
||||
|
||||
class _AuthScreenState extends State<AuthScreen> {
|
||||
bool checkboxState = false;
|
||||
bool hidePassword = true;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -73,9 +74,20 @@ class _AuthScreenState extends State<AuthScreen> {
|
||||
selector: (state) => state.passwordController,
|
||||
builder: (context, passwordController) {
|
||||
return CustomTextFormField(
|
||||
obscureText: true,
|
||||
obscureText: hidePassword,
|
||||
controller: passwordController,
|
||||
hintText: 'Введите пароль',
|
||||
suffix: IconButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
hidePassword = !hidePassword;
|
||||
});
|
||||
},
|
||||
icon: Icon(
|
||||
hidePassword ? Icons.visibility_outlined : Icons.visibility_off_outlined,
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user