addUserMetadata method
Saves custom metadata in the log.
This method allows adding a user-defined key-value pair to the log metadata. The key is a string identifier, and the value is a buffer (Uint8List value) containing the associated data. This method must be called before stopping the recording to ensure the metadata is saved in the final log.
Parameters
- IN key The key of the user metadata.
- IN userMetata The buffer to be recorded.
Throws
- An exception if it fails
Implementation
void addUserMetadata(final String key, final Uint8List userMetadata) {
objectMethod(
_pointerId,
'Recorder',
'addUserMetadata',
args: <String, String>{
'key': key,
'userMetadatadata': base64Encode(userMetadata),
},
);
}