Home > Software engineering >  What are the effects of "deprecated API" error on flutter?
What are the effects of "deprecated API" error on flutter?

Time:10-31

My code show this error. I didn't use "flutter_secure_storage" dependency but it shows this error. But the app is working well, What is the reason for this and how to fix this also if didn't fix this, the effect of this error? enter image description here

CodePudding user response:

flutter_secure_storage is a plugin which uses platform specific APIs to interact with the device.

This warning suggests that it is using a deprecated Java API on the Android device. You can't really fix it unless you know Java and are willing to contribute to the plugin. At the same time, you can safely-ish ignore it for now: even deprecated APIs usually last a long time, and it won't affect any functioning until the underlying API is actually removed.

The best thing to do is regularly check for updates to the package, which might fix this warning.

CodePudding user response:

As the error suggests, the package flutter_secure_storage use the file specified in the error, which in turn use or implements a deprecated API.

You might not use that plugin, but you are using some other plugin that use it.

You are not affected by it now because it is just a warning/information.

You could get affected by it when the depreciation goes to be removed instead. But by that time the package will have been updated. So all you have to do is update the package at a later time when said deprecation has been solved.

  • Related