Answer the question
In order to leave comments, you need to log in
How to check user authorization in an application on Flutter?
There is an application on flutter. There is a separate screen with an authorization form. From there, I retrieve the token and store it locally on the device. Tell me how best to check the relevance of the token on each screen?
For now, I'm thinking of using a provider and calling the token-checking method on each screen.
Maybe there is a better solution?
Answer the question
In order to leave comments, you need to log in
Well, you can use a singleton or a static method in the responsible class / function and call it to check.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question