setPassword method
Sets or updates a user's password.
phoneNumber
The user's phone number.
password
The new password.
Returns a Future<Map<String, dynamic>>
containing the response from the password setting operation.
Note: The endpoint /api/set-password/
is assumed.
Implementation
Future<Map<String, dynamic>> setPassword(
String phoneNumber, String password) async {
return await _makeRequest(
'/api/set-password/', // Adjust endpoint as needed
method: 'POST',
body: {
'phone': phoneNumber,
'password': password,
},
);
}