call method

  1. @override
Future<Either<Failure, ElectricalNode>> call({
  1. String? params,
})
override

Executes the use case with optional parameters.

Returns a Future that completes with the result of type T. Implementations should handle errors appropriately.

Implementation

@override
Future<Either<Failure, ElectricalNode>> call({String? params}) async {
  if (params == null) return const Left(CacheFailure("No ID provided"));
  return await repository.loadDiagram(params);
}