简体   繁体   English

如何正确更改后颤应用程序启动器图标颜色

[英]how to change the back flutter app launcher icon color properly

I have added app launcher icon using this link and app launcher icon has changed but the problem is background has changed to orange color but the actual icon color is blue.我使用此链接添加了应用程序启动器图标,并且应用程序启动器图标已更改,但问题是背景已更改为橙色,但实际图标颜色为蓝色。 Any idea on why is this happening?知道为什么会这样吗?

you should use image plugins as well to fix your issue, looks like您还应该使用图像插件来解决您的问题,看起来像

dev_dependencies: 
    flutter_launcher_icons: "^0.7.0"
    image: "^2.1.0"


flutter_icons:
  android: "launcher_icon" 
  ios: true
  image_path: "assets/icon/icon.png"

And then you can run command :然后你可以运行命令:

flutter packages get
flutter packages pub run flutter_launcher_icons:main

For those still seeing this problem I discovered if you want to use the adaptive_icon_background you HAVE to also use the adaptive_icon_foreground.对于那些仍然看到这个问题的人,我发现如果你想使用adaptive_icon_background,你还必须使用adaptive_icon_foreground。

flutter_icons:
 android: true
 ios: true
 remove_alpha_ios: true
 image_path: "assets/logo.png"
 adaptive_icon_foreground: "assets/logo.png" 
 adaptive_icon_background: "assets/logobgcolor.png" 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM