개발/Flutter
입력란에 값 보이지 않게 하기 (비밀번호 입력)
leebera_
2022. 5. 9. 01:24
TextField나 TextFormField 위젯 내에서 사용
TextField(
...
obscureText: true,
enableSuggestions: false,
autocorrect: false,
)
obscureText가 실제로 값이 보이지 않도록 설정하는 것이므로 true로 설정
enableSuggestions는 자동 제안 기능이고, autocorrect는 자동 완성 기능이므로 둘 다 false로 설정하여 노출 위험성을 줄임
참고
How to add a Password input type in flutter makes the password user input is not visible , just like Android Native EditText 's
i meet a problem that Flutter 's TextInputType do not have a password type: /// All possible enum values. static const List<TextInputType> values = const <TextInputType>[ text, mul...
stackoverflow.com