LoginStore provides a complete set of login management APIs, including user login, logout, and personal information settings. Through this class, you can manage user login status and user profiles.LoginStore instance.Property | Type | Description |
loginStatus | Login status. | |
loginUserInfo | Logged-in user information. |
Function | Description |
Singleton object. | |
Login event stream. | |
Login. | |
Logout. | |
Set personal information. | |
Set offline push certificate IDs. |
static LoginStore get shared => LoginStoreImpl.instance;
Future<CompletionHandler> login({required int sdkAppID,required String userID,required String userSig,});
Parameter | Type | Description |
sdkAppID | int | |
userID | String | User ID. The recommended length limit is 32 bytes, and only uppercase and lowercase English letters (a-zA-Z), digits (0-9), underscores, and hyphens are allowed. |
userSig | String | User signature. For the generation of userSig, please refer to the Secure authentication with userSig. |
Future<CompletionHandler> logout();
Future<CompletionHandler> setSelfInfo({required UserProfile userInfo});
Parameter | Type | Description |
userProfile | User profile. |
Enum Value | Description |
unlogin | Not logged in. |
logined | Logged in. |
Enum Value | Value | Description |
allowAny | 0 | Allow anyone. |
needConfirm | 1 | Need confirmation. |
denyAny | 2 | Deny anyone. |
Enum Value | Value | Description |
unknown | 0 | Unknown. |
male | 1 | Male. |
female | 2 | Female. |
Enum Value | Description |
kickedOffline | Current user kicked offline. |
loginExpired | Login ticket expired. |
Property | Type | Description |
userID | String | User ID. |
nickname | String? | Nickname. |
avatarURL | String? | Avatar URL. |
selfSignature | String? | Personal signature. |
gender | Gender. | |
role | int? | Role. This field has no business restrictions, so you can safely use any valid integer value. |
level | int? | Level. This field has no business restrictions, so you can safely use any valid integer value. |
birthday | int? | Birthday. This field has no business restrictions, so you can safely use any valid integer value. |
allowType | Friend verification type. | |
customInfo | Map<String, String>? | Custom information. |
Property | Type | Description |
loginStatus | Login status. | |
loginUserInfo | Logged-in user information. |
フィードバック