Created
June 15, 2020 19:10
-
-
Save ookami-kb/5cd561048f793592e96e733374035861 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SharedPrefTokenRepository implements TokenRepository { | |
@override | |
Future<void> save(String token) async => | |
(await SharedPreferences.getInstance()) | |
.setString(_keyToken, token); | |
@override | |
Future<String> load() async => (await SharedPreferences.getInstance()) | |
.getString(_keyToken); | |
static const String _keyToken = 'token'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment