find method

Future<Task> find(
  1. String id
)

Returns a task by id or throws NotFoundException.

Implementation

Future<Task> find(String id) async {
  final task = await _repo.findById(id);
  if (task == null) throw NotFoundException('Task $id not found');
  return task;
}