updateAccount method
Future<void>
updateAccount(
- ClientAccountUpdateContext clientAccountUpdateContext, {
- required void onSuccess(),
- required void onError(
- SyneriseError error
This function updates a client account using the provided context.
Args: clientAccountUpdateContext (ClientAccountUpdateContext): It is an object of type ClientAccountUpdateContext that contains the information needed to update a client's account. This object may include fields such as the client's name, email, phone number, address, and any other relevant information that needs to be updated.
Implementation
Future<void> updateAccount(
ClientAccountUpdateContext clientAccountUpdateContext,
{required void Function() onSuccess,
required void Function(SyneriseError error) onError}) async {
SyneriseResult<void> result =
await _methods.updateAccount(clientAccountUpdateContext);
result.onSuccess((result) {
onSuccess();
}).onError((error) {
onError(error);
});
}