getCurrentDeviceId method
获取当前设备 ID。
Return 当前设备 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;
}
}