AccountModule class

Module for handling account operations.

This module provides methods for users to manage their own account, including updating profile information, changing passwords, and deleting accounts.

Obtain an instance from BetterAuthClient.account:

final response = await authClient.account.update(name: 'New Name');

Constructors

AccountModule(Dio _dio, StorageInterface _storage)
Creates a new AccountModule instance.

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

changePassword({required String newPassword, String? oldPassword}) Future<AuthResponse<void>>
Changes the user's password.
delete() Future<AuthResponse<void>>
Deletes the current user's account.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update({String? name, String? image}) Future<AuthResponse<User>>
Updates the current user's account information.

Operators

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