login with phone
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user