ApiUserRepo class

The ApiUserRepo class handles API operations related to user registration and login.

It communicates with the backend through HTTP requests for user-related actions like registering a new user or logging in an existing one, using the ApiConnector.

Constructors

ApiUserRepo(ApiConnector _apiConnector)
Constructs an instance of ApiUserRepo.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getUserFromHttpResponse(Response response) User
Extracts a User object from the HTTP response.
login({required String userName, required String hashedPassword}) Future<ApiReturn>
Logs in a user via the API.
loginUsingUser({required User user}) Future<ApiReturn>
Logs in a user via the API using a User object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerUser({required String userName, required String hashedPassword}) Future<ApiReturn>
Registers a new user via the API.
toString() String
A string representation of this object.
inherited

Operators

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