signIn method
Future<void>
signIn(
- String email,
- String password, {
- required void onSuccess(),
- required void onError(
- 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);
});
}