Skip to content

Instantly share code, notes, and snippets.

@alaershov
Created June 4, 2019 17:12
Show Gist options
  • Save alaershov/174c62a3478133877107e39f5a112a5a to your computer and use it in GitHub Desktop.
Save alaershov/174c62a3478133877107e39f5a112a5a to your computer and use it in GitHub Desktop.
Toothpick: user repository with Inject
public final class UserRepository {
private final SharedPreferences sharedPreferences;
@Inject
public UserRepository(SharedPreferences sharedPreferences) {
this.sharedPreferences = sharedPreferences;
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment