loginToSystem method
login .....
Implementation
Future<void> loginToSystem(
String email,
String password,
var successfulFunction,
var wrongPassword,
var userNotFound,
var exceptionFunction) async {
print("login process starts here....");
try {
Constants.firebaseAuth
.signInWithEmailAndPassword(email: email, password: password)
.then((value) => successfulFunction())
.onError((error, stackTrace) => userNotFound(error))
.timeout(const Duration(seconds: 30));
} catch (exception) {
print(exception);
exceptionFunction(exception);
}
}