publishPresence method

Future<void> publishPresence(
  1. String description
)

Publishes a custom presence state.

Param description The extension information of the presence state. It can be set as nil.

Throws A description of the exception. See ChatError.

Implementation

Future<void> publishPresence(
  String description,
) async {
  try {
    Map req = {'desc': description};
    Map result = await platform_interface.Client.instance.presenceManager
        .callNativeMethod(ChatMethodKeys.presenceWithDescription, req);
    ChatError.hasErrorFromResult(result);
  } catch (e) {
    rethrow;
  }
}