HotKey.fromJson constructor
Implementation
factory HotKey.fromJson(Map<String, dynamic> json) {
return HotKey(
KeyCodeParser.parse(json['keyCode']),
modifiers: List<String>.from(json['modifiers'])
.map((e) => KeyModifierParser.parse(e))
.toList(),
identifier: json['identifier'],
scope: HotKeyScope.values.firstWhere(
(e) => describeEnum(e) == json['scope'],
orElse: () => HotKeyScope.system,
),
);
}