LoginStore class abstract
Login event. Login related interfaces, managing user login, logout, user information settings and other operations.
LoginStore Login management class for handling user login, logout and user information management business logic.
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.
Key Features
- User Login:Supports login using SDK application ID, user ID and user signature
- User Logout:Supports user logout operation
- Personal Information Settings:Supports setting user nickname, avatar, gender and other personal information
Note: Login status updates are delivered through loginState publisher. Subscribe to it to receive real-time updates about login status.
Topics
Getting Instance
- shared : Singleton object
Observing State
state: Login state
Observing Events
Login Operations
- login : Login
- logout : Logout
- setSelfInfo : Set personal information
See Also
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- loginState → LoginState
-
Login state
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sdkAppID → int
-
SDK application ID
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListenerwill throw after the object is disposed).inherited -
login(
{required int sdkAppID, required String userID, required String userSig}) → Future< CompletionHandler> - Login
-
logout(
) → Future< CompletionHandler> - Logout
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
setSelfInfo(
{required UserProfile userInfo}) → Future< CompletionHandler> - Set personal information
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
Singleton object
no setter