Created
June 15, 2020 19:11
-
-
Save ookami-kb/6dad9b43b2c96f3417c6f24655921d81 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