signIn method

Future<void> signIn(
  1. String email,
  2. String password, {
  3. required void onSuccess(),
  4. required void onError(
    1. SyneriseError error
    ),
})

This function takes an email and password as parameters and signs in the user using those credentials.

Args: email (String): A string representing the email address of the user trying to sign in. password (String): The password parameter is a string that represents the user's password.

Implementation

Future<void> signIn(String email, String password,
    {required void Function() onSuccess,
    required void Function(SyneriseError error) onError}) async {
  SyneriseResult<void> result = await _methods.signIn(email, password);

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