registerAccount method

Future<void> registerAccount(
  1. ClientAccountRegisterContext clientAccountRegisterContext, {
  2. required void onSuccess(),
  3. required void onError(
    1. SyneriseError error
    ),
})

This function registers a client account asynchronously using the provided context.

Args: clientAccountRegisterContext (ClientAccountRegisterContext): It is an object of type ClientAccountRegisterContext that contains the necessary information to register a client account.

Implementation

Future<void> registerAccount(
    ClientAccountRegisterContext clientAccountRegisterContext,
    {required void Function() onSuccess,
    required void Function(SyneriseError error) onError}) async {
  SyneriseResult<void> result =
      await _methods.registerAccount(clientAccountRegisterContext);

  result.onSuccess((result) {
    onSuccess();
  }).onError((error) {
    onError(error);
  });
}