Flutter records twice 401 without permission problem and dependency version conflict problem

Question 1:
The field name is wrong.
The parameter required by the backend request header is accessToken, and the request header on my side is access_token.

Question 2:
The parameter type is not correct.
Since the backend was written by two people, the coding habits are different. At that time, the type of userID required by the interface was a string type, while the parameter type on my side was an int integer.

Version conflict issues:
For example:

flutter_localizations any from sdk which depends on intl 0.15.8, intl 0.15.8 is required.
So, because env_pro_supervise depends on intl ^0.16.0, version solving failed.

If it is a dependency conflict between two dependencies, and it is not clear which version of the dependency should be used, we can use any to solve the problem of version dependency version conflict. However, it is not recommended to use any dependency, and it is often necessary to find the correct version replacement in pubspec.lock.

Guess you like

Origin blog.csdn.net/qq_41160739/article/details/124846528