如何在 flutter 中删除 pubspec.yaml 中指定的资产?

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

在我的 flutter 应用程序中,我只需要一个资产用于应用程序的第一次启动,然后想删除它。这可能吗?

我主要在 Android 中使用 flutter,因此如果无法使用 Dart 代码,也将不胜感激平台特定的答案。

为什么不启用随时读取您的资产并处理在代码中按条件显示的可能性。

目前不可能。

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

它在构建时与应用程序打包在一起,无法修改。