getUserMetadata method

Uint8List getUserMetadata(
  1. String key
)

Retrieve metadata associated with a specific key from the customer buffer.

This method returns the metadata that was previously added using the addUserMetadata method.

Parameters

  • IN key The key associated with the metadata to be retrieved.

Returns

  • The metadata associated with the provided key as Uint8List
  • If no metadata is found for the key, a null value or an empty buffer might be returned.

Throws

  • An exception if it fails to initialize.

Implementation

Uint8List getUserMetadata(final String key) {
  final OperationResult resultString = objectMethod(
    _pointerId,
    'LogMetadata',
    'getUserMetadata',
    args: key,
  );
  final String result = resultString['result'];
  return base64Decode(result);
}