getUserMetadata method

Uint8List? getUserMetadata(
  1. 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 null if no data exists for the provided key.

Also see:

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);
}