getUserMetadata method
- String key
Retrieves custom user metadata stored with the given key.
The method returns the raw byte buffer that was previously saved using
addUserMetadata. If the key does not exist an asynchronous empty
response is represented as null.
Parameters
key: The string key used when saving the metadata.
Returns
- A Uint8List with the stored data, or
nullif no data exists for the provided key.
Also see:
- addUserMetadata - Store custom metadata in the log.
- Recorder.addUserMetadata - Add custom metadata during recording.
Implementation
Uint8List? getUserMetadata(final String key) {
final OperationResult resultString = objectMethod(
pointerId,
'LogMetadata',
'getUserMetadata',
args: key,
);
final String result = resultString['result'];
if (result == '') {
return null;
}
return base64Decode(result);
}