loginIMWithResult static method
登录IM,并返回登录结果,包含错误码
Implementation
static Future<NIMResult<void>> loginIMWithResult(
String accountId, String token,
{NIMLoginOption? option}) async {
//初始化在线状态监听
if (IMKitConfigCenter.enableOnlineStatus) {
SubscriptionManager.instance.init();
}
//初始化联系人全局缓存
getIt<ContactProvider>().init();
return (await getIt<IMLoginService>()
.loginIM(accountId, token, option: option));
}