17 lines
344 B
Dart
17 lines
344 B
Dart
import 'package:be_happy/core/result.dart';
|
|
import 'package:be_happy/domain/entities/scooter.dart';
|
|
|
|
import '../repositories/scooter_repository.dart';
|
|
|
|
|
|
class GetScooterUsecase {
|
|
final ScooterRepository repository;
|
|
|
|
GetScooterUsecase(this.repository);
|
|
|
|
Future<Result<Scooter?>> call(int id) {
|
|
return repository.getScooter(id);
|
|
}
|
|
}
|
|
|