handleSignIn method
Implementation
Future<void> handleSignIn(PhoneAuthCredential credential, Function onSuccess, Function onError) async{
await auth.signInWithCredential(credential).then((value) {
onSuccess();
}).catchError((error){
AlertX.instance.showAlert(
title: "Error",
msg: error.message ?? "",
negativeButtonText: null,
positiveButtonText: "Done",
negativeButtonPressed: (){},
positiveButtonPressed: (){
Navigation.instance.goBack();
}
);
onError();
});
}