call method
- ElectricalNode? 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({ElectricalNode? params}) async {
if (params == null) return const Left(CacheFailure("No diagram provided"));
return await repository.saveDiagram(params);
}