fix: applock enter non digits

This commit is contained in:
Christian Pauly 2021-02-11 15:27:07 +01:00
parent 672dc1be3c
commit 5726c4fc81
1 changed files with 3 additions and 0 deletions

View File

@ -298,6 +298,9 @@ class _SettingsState extends State<Settings> {
textFields: [
DialogTextField(
validator: (text) {
if (int.tryParse(text) == null || int.tryParse(text) < 0) {
return L10n.of(context).pleaseEnter4Digits;
}
if (text.length != 4 && text.isNotEmpty) {
return L10n.of(context).pleaseEnter4Digits;
}