I am making a application in Flutter.
I have a access token coming from an API which I save in shared preferences for session management and authentication.
But here the catch is that this token expires every 1 hour so I need to clear the shared preferences every 1 hour ..
Package used - shared_preferences
So, How do I do that??
I suppose you can handle this scenario better with other approaches, however, if you want to invalidate your token locally based on a validation time you can do this: