21 lines
505 B
Dart
21 lines
505 B
Dart
import '../../../../core/usecases/usecase.dart';
|
|
import '../entities/otp_response.dart';
|
|
import '../repositories/auth_repository.dart';
|
|
|
|
class SendOTP implements UseCase<OtpResponse, SendOTPParams> {
|
|
final AuthRepository repository;
|
|
|
|
SendOTP(this.repository);
|
|
|
|
@override
|
|
Future<Result<OtpResponse>> call(SendOTPParams params) async {
|
|
return await repository.sendOTP(params.phoneNumber);
|
|
}
|
|
}
|
|
|
|
class SendOTPParams {
|
|
final String phoneNumber;
|
|
|
|
SendOTPParams({required this.phoneNumber});
|
|
}
|