decode method
Implementation
VrControllerMessage decode(String encoded) {
final value = jsonDecode(encoded);
if (value is! Map) {
throw const FormatException('Controller message must be a JSON object.');
}
return VrControllerMessage.fromJson(
value.map((key, value) => MapEntry(key.toString(), value)),
);
}