getUserByToken method

Future<User> getUserByToken(
  1. int token
)

Fetches a user by token. In a real app, you would get the token from the local storage.

Implementation

Future<User> getUserByToken(int token) async {
  return _repository.getByToken(token);
}