init method
~english Initializes the SDK.
Param options The configurations: ChatOptions. Ensure that you set this parameter.
~end
~chinese 初始化 SDK。
Param options 配置,不可为空。
~end
Implementation
Future<void> init(ChatOptions options) async {
_updataHandler();
try {
_options = options;
ChatLog.v('init');
await platform_interface.Client.instance.callNativeMethod(
ChatMethodKeys.init,
options.toJson(),
);
_currentUserId = await getCurrentUserId();
} catch (e) {
rethrow;
}
}