in the code shown below how can i return boolean values from this observable (lambda expression)
loginActivityViewModel.checkEmailAndPassword(email,password).observe(this,(response)->{
switch(response){
case LoginActivityViewModel.EMPTY_EMAIL:
handleError(emailWrapper, R.string.error_email_required);
return false;
case LoginActivityViewModel.INVALID_EMAIL:
handleError(emailWrapper, R.string.error_enter_valid_email);
return false;
case LoginActivityViewModel.EMPTY_PASSWORD:
handleError(passwordWrapper, R.string.error_password_required);
return false;
}
});
this block of statement is inside an function that returns boolean values but IDE is telling me unexpected return statement inside the cases. Thankyou for helping in advance