15 lines
379 B
Dart
15 lines
379 B
Dart
import 'package:dartz/dartz.dart';
|
|
import '../../../core/error/failures.dart';
|
|
import '../../entities/price_info.dart';
|
|
import '../../repositories/trading_repository.dart';
|
|
|
|
class GetCurrentPrice {
|
|
final TradingRepository repository;
|
|
|
|
GetCurrentPrice(this.repository);
|
|
|
|
Future<Either<Failure, PriceInfo>> call() async {
|
|
return await repository.getCurrentPrice();
|
|
}
|
|
}
|