hardwareSpecifications property
Map<HardwareSpecification, String>
get
hardwareSpecifications
Gets the device hardware specifications
This map stores key-value pairs representing hardware-related metadata collected at the time of the recording. These details are useful for debugging, performance analysis, and device compatibility tracking. Keys are defined by the HardwareSpecification enum.
Implementation
Map<HardwareSpecification, String> get hardwareSpecifications {
final OperationResult resultString = objectMethod(
pointerId,
'RecorderConfiguration',
'getHardwareSpecifications',
);
final Map<String, dynamic> hardwareSpecificationsAsString =
jsonDecode(resultString['result']) ?? <String, dynamic>{};
final Map<HardwareSpecification, String> hardwareSpecifications =
<HardwareSpecification, String>{};
for (final HardwareSpecification spec in HardwareSpecification.values) {
if (!hardwareSpecificationsAsString.containsKey(spec.id.toString())) {
continue;
}
hardwareSpecifications[spec] =
hardwareSpecificationsAsString[spec.id.toString()] ?? '';
}
return hardwareSpecifications;
}
set
hardwareSpecifications
(Map<HardwareSpecification, String> hardwareSpecifications)
Sets the device hardware specifications
This map stores key-value pairs representing hardware-related metadata collected at the time of the recording. These details are useful for debugging, performance analysis, and device compatibility tracking. Keys are defined by the HardwareSpecification enum.
Implementation
set hardwareSpecifications(
final Map<HardwareSpecification, String> hardwareSpecifications,
) {
final Map<String, String> hardwareSpecificationsAsString =
<String, String>{};
for (final HardwareSpecification spec in hardwareSpecifications.keys) {
hardwareSpecificationsAsString[spec.id.toString()] =
hardwareSpecifications[spec] ?? '';
}
objectMethod(
pointerId,
'RecorderConfiguration',
'setHardwareSpecifications',
args: jsonEncode(hardwareSpecificationsAsString),
);
}