mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Adds ability to show / hide password in profile widget
This commit is contained in:
parent
6d764e32a0
commit
23a27fde67
1 changed files with 11 additions and 1 deletions
|
|
@ -240,6 +240,8 @@ class _ProfileEditState extends State<ProfileEditWidget> {
|
|||
String username = "";
|
||||
String password = "";
|
||||
|
||||
bool _obscured = true;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
|
|
@ -379,10 +381,18 @@ class _ProfileEditState extends State<ProfileEditWidget> {
|
|||
labelText: L10().password,
|
||||
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
||||
hintText: L10().enterPassword,
|
||||
suffixIcon: IconButton(
|
||||
icon: _obscured ? FaIcon(FontAwesomeIcons.eye) : FaIcon(FontAwesomeIcons.solidEyeSlash),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
_obscured = !_obscured;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
initialValue: profile?.password ?? "",
|
||||
keyboardType: TextInputType.visiblePassword,
|
||||
obscureText: true,
|
||||
obscureText: _obscured,
|
||||
onSaved: (value) {
|
||||
password = value ?? "";
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue