24 lines
541 B
Dart
24 lines
541 B
Dart
import '../../../../core/usecases/usecase.dart';
|
|
import '../repositories/auth_repository.dart';
|
|
|
|
class VerifyOTP implements UseCase<bool, VerifyOTPParams> {
|
|
final AuthRepository repository;
|
|
|
|
VerifyOTP(this.repository);
|
|
|
|
@override
|
|
Future<Result<bool>> call(VerifyOTPParams params) async {
|
|
return await repository.verifyOTP(params.otpCode, params.phoneNumber);
|
|
}
|
|
}
|
|
|
|
class VerifyOTPParams {
|
|
final String otpCode;
|
|
final String phoneNumber;
|
|
|
|
VerifyOTPParams({
|
|
required this.otpCode,
|
|
required this.phoneNumber,
|
|
});
|
|
}
|