Skip to content

Commit 13991b8

Browse files
rajveermalviyasm-sayedi
authored andcommitted
login: Show visiblePassword keyboard only when password is visible
When Gboard offers a suggestion from the clipboard, the suggestion will be obscured given `obscureText: true`... except that if we also pass `keyboardType: TextInputType.visiblePassword`, then that causes the suggestion's contents to be visible after all. Avoid that. Fixes: #743 Co-authored-by: Sayed Mahmood Sayedi <[email protected]>
1 parent 51e01f4 commit 13991b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/widgets/login.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ class _UsernamePasswordFormState extends State<_UsernamePasswordForm> {
584584
key: _passwordKey,
585585
autofillHints: const [AutofillHints.password],
586586
obscureText: _obscurePassword,
587-
keyboardType: TextInputType.visiblePassword,
587+
keyboardType: _obscurePassword ? null : TextInputType.visiblePassword,
588588
autovalidateMode: AutovalidateMode.onUserInteraction,
589589
validator: (value) {
590590
if (value == null || value.isEmpty) {

0 commit comments

Comments
 (0)