UserService class

Application service for user CRUD operations.

Constructors

UserService(InMemoryRepository<User, String> _repo, EventBus _events, TransactionManager _transactions)
Creates a service backed by repo, events, and transactions.

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

createFromRequest(CreateUserRequest req) Future<User>
Validates and persists a new user from req.
delete(String id) Future<bool>
Deletes a user by id.
findAll() Future<List<User>>
Returns all users.
findById(String id) Future<User>
Returns a user by id or throws NotFoundException.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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