How can I delete assets specified in pubspec.yaml in flutter? How can I delete assets specified in pubspec.yaml in flutter? dart dart

How can I delete assets specified in pubspec.yaml in flutter?


It's impossible currently.

The rootBundle contains the resources that were packaged with theapplication when it was built. To add resources to the rootBundle foryour application, add them to the assets subsection of the fluttersection of your application's pubspec.yaml manifest.

It's packaged with the app on build time, and it can't be modified.


Why don't you enable to read your assets anytime and handle the possibility of displaying in your code by condition.