fix: backup restore failed

This commit is contained in:
lollipopkit
2023-04-16 11:59:00 +08:00
parent 5c2cc5e5e4
commit fd2d59b1e0
13 changed files with 66 additions and 39 deletions

View File

@@ -31,7 +31,7 @@ class Backup {
keys = (json['keys'] as List)
.map((e) => PrivateKeyInfo.fromJson(e))
.toList(),
dockerHosts = json['dockerHosts'];
dockerHosts = json['dockerHosts'] ?? {};
Map<String, dynamic> toJson() => {
'version': version,

View File

@@ -12,4 +12,4 @@ class VirtualKey {
{this.key, this.toggleable = false, this.icon, this.func});
}
enum VirtualKeyFunc { toggleIME, backspace, copy, paste }
enum VirtualKeyFunc { toggleIME, backspace, copy, paste, snippet }