TaskService class

Application service for task CRUD operations.

Constructors

TaskService(InMemoryRepository<Task, String> _repo)
Creates a service backed by repo.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

all() Future<List<Task>>
Returns all tasks.
create(CreateTaskRequest req) Future<Task>
Validates and creates a task from req.
delete(String id) Future<bool>
Deletes a task by id.
find(String id) Future<Task>
Returns a task by id or throws NotFoundException.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toggle(String id) Future<Task>
Toggles the done flag for a task id.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited