signIn method
Implementation
@override
Future<User?> signIn(String mail, String pass, SessionTypes type) async {
try {
var ret;
switch (type) {
case SessionTypes.GOOGLE:
ret = await _googleLogin();
break;
case SessionTypes.APPLE:
ret = await _appleLogin();
break;
case SessionTypes.CUSTOM:
ret = await _customLogin(mail, pass);
break;
default:
throw Exception("$type did not handle in sign in");
}
return ret;
} on PlatformException catch (pe) {
if (pe.code == OP_CANCELED) {
throw ModCancelledException();
} else {
throw pe;
}
} on INetworkException catch (e) {
ModLogger.e(error: e);
rethrow;
} on Exception catch (e) {
ModLogger.e(error: e);
throw e;
}
}