toJson method
Implementation
Map<String, Object?> toJson() => <String, Object?>{
'protocolVersion': protocolVersion,
'deviceId': deviceId,
'deviceName': deviceName,
'handedness': handedness.name,
'widthMeters': widthMeters,
'heightMeters': heightMeters,
'controls': controls.map((control) => control.toJson()).toList(),
};