getCurrentDeviceId method

Future<String> getCurrentDeviceId()

Gets the current device ID.

Return The current device ID.

Implementation

Future<String> getCurrentDeviceId() async {
  try {
    Map result = await platform_interface.Client.instance
        .callNativeMethod(ChatMethodKeys.getCurrentDeviceId);
    ChatError.hasErrorFromResult(result);
    ChatDeviceInfo deviceInfo =
        ChatDeviceInfo.fromJson(result[ChatMethodKeys.getCurrentDeviceId]);
    return deviceInfo.deviceUUID ?? '';
  } catch (e) {
    rethrow;
  }
}