Services
User Service
The UserService class provides methods for user authentication and handling user data.
Methods
authenticateUser({required String username, required String password}) -> Future<UserModel?>
authenticateUser({required String username, required String password}) -> Future<UserModel?>Authenticates a user based on the provided username and password.
isAuthenticated() -> bool
isAuthenticated() -> boolChecks if a user is currently authenticated.
getCurrentUser() -> UserModel?
getCurrentUser() -> UserModel?Retrieves the current authenticated user.
logout() -> void
logout() -> voidLogs out the current user.
updateUserProfile(UserModel newUser) -> void
updateUserProfile(UserModel newUser) -> voidUpdates the user profile with the provided UserModel instance.
Last updated
Was this helpful?