CockpitKeyEventRequest.fromJson constructor

CockpitKeyEventRequest.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory CockpitKeyEventRequest.fromJson(Map<String, Object?> json) {
  final logical = _requireLogicalKey(json['logicalKey']);
  return CockpitKeyEventRequest(
    logicalKey: logical,
    physicalKey:
        _maybePhysicalKey(json['physicalKey']) ??
        _maybePhysicalKey(json['logicalKey']),
    character: json['character'] as String?,
  );
}