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 }

View File

@@ -2,8 +2,9 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 255;
static const String engine = "Flutter 3.7.7 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 2ad6cd72c0 (4 weeks ago) • 2023-03-08 09:41:59 -0800\nEngine • revision 1837b5be5f\nTools • Dart 2.19.4 • DevTools 2.20.1\n";
static const String buildAt = "2023-04-05 15:03:38.565037";
static const int build = 256;
static const String engine =
"Flutter 3.7.7 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 2ad6cd72c0 (4 weeks ago) • 2023-03-08 09:41:59 -0800\nEngine • revision 1837b5be5f\nTools • Dart 2.19.4 • DevTools 2.20.1\n";
static const String buildAt = "2023-04-05 15:16:00.949501";
static const int modifications = 2;
}

View File

@@ -13,7 +13,8 @@ var virtualKeys = [
// 'Del',
// key: TerminalKey.delete,
// ),
VirtualKey('Paste', func: VirtualKeyFunc.paste, icon: Icons.paste),
//VirtualKey('Paste', func: VirtualKeyFunc.paste, icon: Icons.paste),
VirtualKey('Snippet', func: VirtualKeyFunc.snippet, icon: Icons.code),
VirtualKey('Tab', key: TerminalKey.tab),
VirtualKey('Ctrl', key: TerminalKey.control, toggleable: true),
VirtualKey('Left', key: TerminalKey.arrowLeft, icon: Icons.arrow_back),