21 lines
563 B
Dart
21 lines
563 B
Dart
import '../../data/models/device_add_path_point_model.dart';
|
|
import '../repositories/path_repository.dart';
|
|
|
|
abstract class GeneratePathUseCase {
|
|
Future<List<DeviceAddPathPointModel>> execute(List<DeviceAddPathPointModel> coordinates);
|
|
}
|
|
|
|
class GeneratePathUseCaseImpl implements GeneratePathUseCase {
|
|
final PathRepository _repository;
|
|
|
|
GeneratePathUseCaseImpl(this._repository);
|
|
|
|
@override
|
|
Future<List<DeviceAddPathPointModel>> execute(List<DeviceAddPathPointModel> coordinates) async {
|
|
return await _repository.generatePath(coordinates);
|
|
}
|
|
|
|
|
|
}
|
|
|