Automatically adapt to API changes

Spread the love

Whenever there are API changes in Flutter, then one need to update the code for the new APIs by removing the deprecated API and adding the alternative APIs. You can do it by using the following commands automatically:

First check what needs to be updated by using the following command:

dart fix --dry-run

And if you see ‘DEPRECATED_MEMBER_USE’, then use the following command to apply the fixes automatically:

dart fix --apply

And you have updated the your flutter code, according to latest APIs.

Please share your thoughts too. Till then, Cheers and Peace out!!!