AuthManager<U> class

Auth provider.

Mixed in types

Constructors

AuthManager(AuthStore<U> store)
Initialize AuthProvide with AuthStore implementation to store logged in U.

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isLoggedIn bool
Get if user is currently logged in or not.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
user → U?
Get the current logged in user U.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addLoginListener(LoginListener<U> onLogin) → void
Add listener to LoginListeners. The listeners will get called with logged in user U. Setting up Sentry user and other login related activities can be done using the listener.
addLogoutListener(LogoutListener onLogout) → void
Add listener to LogoutListeners. The listeners will get called when user logout is called. Clearing Sentry user other cache clearing can be done using the listener
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
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 addListener will throw after the object is disposed).
inherited
initialize() Future<void>
Call AuthStore retrieve to load user from memory.
inherited
logout() Future<void>
This function should be called when you want to logged out current user. Store will get cleared and LogoutListener will get called.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
onLogin(U user) Future<void>
This function should be called after user U credentials got authenticated. Authenticated user must be provided.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setUser(U? user) → void
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited