LoggedInUserOrError class

A class representing either a successfully logged-in user or an authentication error.

Constructors

LoggedInUserOrError()

Properties

authError AuthError?
The error that occurred during authentication, if any.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
loggedInUser LoggedInUser?
The logged-in user, if successful.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getUser() LoggedInUser
Returns the LoggedInUser if authentication was successful.
isError() bool
Returns true if an authentication error occurred, false otherwise.
isUser() bool
Returns true if a user is logged in, false otherwise.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromError(AuthError authError) LoggedInUserOrError
Creates an instance of LoggedInUserOrError from an authError.
fromUser(LoggedInUser loggedInUser) LoggedInUserOrError
Creates an instance of LoggedInUserOrError from a loggedInUser.