# setToken method Null safety

1. @override

Future<void> setToken(

1. OAuthToken token

)
override

토큰(`token`)를 저장

## Implementation

    @override
    Future<void> setToken(OAuthToken token) async {
      _encryptor ??= await AESCipher.create();
      _preferences ??= await SharedPreferences.getInstance();
      _preferences!.setString(versionKey, KakaoSdk.sdkVersion);
      await _preferences!
          .setString(tokenKey, _encryptor!.encrypt(jsonEncode(token)));
      _currentToken = token;
    }