我正在寻找更改我当前应用程序的app icon。我使用了包名为flutter_launcher_icons的代码。
我还发现我可以通过在android/app/res文件夹的mipmap-xxxhdpi中放置一个图像来做到这一点。而且它是有效的。
所以我的问题是为什么我们需要额外的软件包(flutter_launcher_icons)。
发布于 2019-09-23 18:28:30
当你使用flutter_launcher_icons包时,它会自动为应用程序生成不同的图标大小,这比只将图像放入android/app/res的mipmap-xxxhdpi中要好。
例如,如果将flutter_launcher_icons添加到pubspec.yaml
dev_dependencies:
flutter_launcher_icons: "^0.7.3"
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/icon.png"然后执行以下命令:
flutter pub get
flutter pub run flutter_launcher_icons:main它将在安卓的res文件夹和ios的Assets.xcassets文件夹中生成不同大小的所有图标。
有关更多信息,请查看此处:
https://stackoverflow.com/questions/58060157
复制相似问题