Last active
September 8, 2021 11:58
-
-
Save PreyeaRegmi/21367b3bbecb69207b01d3dcfe00732f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LoanParamRequest { | |
final double amount, time; | |
LoanParamRequest(this.amount, this.time); | |
} | |
class LoanDetailResponse { | |
String? _emi; | |
} | |
class LoanDetailDTO { | |
final double _rate; | |
LoanDetailDTO(this._rate); | |
} | |
abstract class ILoanRepository | |
{ | |
Future<LoanDetailDTO> getLoanFromServer(String amount,String time); | |
} | |
class UseCaseNotImplementedException implements Exception {} | |
class FetchLoanDetail extends UseCase<LoanParamRequest, LoanDetailResponse> { | |
final ILoanRepository _loanRepository; | |
FetchLoanDetail(this._loanRepository); | |
@override | |
Stream<LoanDetailResponse> buildUseCase(LoanParamRequest param) { | |
return Stream.error(UseCaseNotImplementedException()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment