login with phone

This commit is contained in:
Felipe
2024-02-22 10:35:23 -05:00
parent e00772f58a
commit 113937df56
3 changed files with 31 additions and 5 deletions
+8
View File
@@ -1,3 +1,5 @@
import 'dart:developer';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:equatable/equatable.dart';
import 'package:user_repository/user_repository.dart';
@@ -33,6 +35,12 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
try {
final bool isVerified = await _userRepository.verifyOTP(event.code);
if (isVerified) {
emit(AuthStateSuccess());
} else {
emit(const AuthStateVerifyOAuth(true));
}
(isVerified)
? emit(AuthStateSuccess())
: emit(const AuthStateVerifyOAuth(true));