Minimum heartbeat value
This commit is contained in:
parent
22b874fd54
commit
d669d9eef8
1 changed files with 4 additions and 1 deletions
|
|
@ -82,8 +82,11 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||
}
|
||||
}
|
||||
if (isInt) {
|
||||
final intValue = int.tryParse(result);
|
||||
int? intValue = int.tryParse(result);
|
||||
if (intValue != null) {
|
||||
if (key == Preferences.heartbeat && intValue > 0 && intValue < 60) {
|
||||
intValue = 60; // minimum heartbeat is 60 seconds
|
||||
}
|
||||
await Preferences.instance.setInt(key, intValue);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue