getSessionMetadataForKey method

Future getSessionMetadataForKey({
  1. required String key,
})

getSessionMetadataForKey method is used to get metadata corresponding to the given key. If there is no data corresponding to the given key it returns null.

Parameters:

key key for which metadata is required

Refer: Read more about getSessionMetadataForKey here

Implementation

Future<dynamic> getSessionMetadataForKey({required String key}) async {
  dynamic result = await PlatformService.invokeMethod(
      PlatformMethod.getSessionMetadataForKey,
      arguments: {"key": key});
  if (result["success"]) {
    return result["data"];
  } else {
    return HMSException.fromMap(result["data"]["error"]);
  }
}