updateMetaData method

Future<Map<String, String>> updateMetaData(
  1. Map<String, String> metaDataMap
)

updateMetaData

Implementation

Future<Map<String, String>> updateMetaData(
    Map<String, String> metaDataMap) async {
  sbLog.i(StackTrace.current, 'metaDataMap: $metaDataMap');

  if (metaDataMap.isEmpty) {
    throw InvalidParameterException();
  }

  final result = await chat.apiClient
      .send(UserMetaDataUpdateRequest(chat, metaDataMap, upsert: true));
  final map = Map<String, String>.from(result);
  metaData.addAll(map);
  return map;
}