fix: applock enter non digits
This commit is contained in:
parent
15dff78916
commit
7c46c25041
1 changed files with 3 additions and 0 deletions
|
|
@ -298,6 +298,9 @@ class _SettingsState extends State<Settings> {
|
||||||
textFields: [
|
textFields: [
|
||||||
DialogTextField(
|
DialogTextField(
|
||||||
validator: (text) {
|
validator: (text) {
|
||||||
|
if (int.tryParse(text) == null || int.tryParse(text) < 0) {
|
||||||
|
return L10n.of(context).pleaseEnter4Digits;
|
||||||
|
}
|
||||||
if (text.length != 4 && text.isNotEmpty) {
|
if (text.length != 4 && text.isNotEmpty) {
|
||||||
return L10n.of(context).pleaseEnter4Digits;
|
return L10n.of(context).pleaseEnter4Digits;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue