当我使用flutter create命令创建应用程序时,flutter标志将用作两个平台的应用程序图标。
如果我想改变应用程序的图标,我是否应该去两个平台的目录并替换那里的图像?我说的平台目录是myapp/ios/Runner/Assets.xcassets/AppIcon。apppiconset用于iOS, myapp/android/app/src/main/res用于android。
或者可以将图像定义为颤振资产和图标以某种方式生成?
当我使用flutter create命令创建应用程序时,flutter标志将用作两个平台的应用程序图标。
如果我想改变应用程序的图标,我是否应该去两个平台的目录并替换那里的图像?我说的平台目录是myapp/ios/Runner/Assets.xcassets/AppIcon。apppiconset用于iOS, myapp/android/app/src/main/res用于android。
或者可以将图像定义为颤振资产和图标以某种方式生成?
当前回答
试试IconKitchen吧,它是Android Asset Studio的继承者,是为Android、iOS和网页制作高度自定义应用图标的绝佳新方法。
其他回答
flutter_launcher_icons: ^ 0.11.0
将此添加到你的pubspec中。yaml文件
dev_dependencies:
flutter_launcher_icons: "^0.11.0"
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/icon.png"
min_sdk_android: 21 # android min sdk min:16, default 21
# optionally, as transparency is not allowed on app store
# remove_alpha_ios: true
添加后,运行以下命令
$颤振酒吧得到
$ flutter pub运行flutter_launcher_icons:main
我建议你使用下面链接的这个网站
应用图标创造者
步骤1:上传图片
步骤2:做必要的修改,然后点击下载(不要更改文件名)
步骤3:解压下载的Zip文件在相应的文件夹
android/app/src/main/res
我使用很少的方法来更换颤振应用程序lancher图标,但只有手动方法是有点容易和好。因为你会知道它是如何运作的。
更改flutter ios图标。首先得到你的图标1024×1024像素的副本,并生成一组图标的android和ios使用appicon。有限公司发电机。 当你得到压缩文件,它工作创建两个文件夹ios和android打开ios文件夹和复制文件夹,并替换一个在你的ios/runner目录。
对于android,复制android文件夹中的所有文件夹,并替换在android/app/src/main/res/drawable中的文件夹。
在ios和android上替换文件夹后,停止应用程序并重新运行,您的图标将被更改。
您必须将Flutter图标文件替换为您自己的图像。这个网站将帮助你把你的png转换成各种大小的启动器图标:
https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html
试试IconKitchen吧,它是Android Asset Studio的继承者,是为Android、iOS和网页制作高度自定义应用图标的绝佳新方法。