【问题标题】:How to change app icon in flutter using VS code?如何使用 VS 代码更改 Flutter 中的应用程序图标?
【发布时间】:2022-01-20 23:21:11
【问题描述】:

enter image description here如何使用 VS 代码更改 Flutter 中的应用图标。我一次又一次地尝试,但它不起作用在线查看不同的方法但没有积极的结果

【问题讨论】:

标签: android flutter dart visual-studio-code


【解决方案1】:

您可以使用 flutter_launcher_icons: ^0.9.2

创建名为 assets 的新文件夹和名为 icon 的子文件夹,然后在 pubspec.yaml 文件中进行如下更改:

dev_dependencies:
  flutter_launcher_icons: "^0.9.2"

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

这里的图标图片应该是icon.png,它会存放在路径:assets/icon

现在在终端运行

flutter pub get

更多信息请查看this 作为参考。这个video 可能会有所帮助。

【讨论】:

    【解决方案2】:

    在flutter插件的帮助下,你可以改变flutter图标包:

    flutter_launcher_icons:^0.9.2

    • 第 1 步:
    dev_dependencies:
      flutter_launcher_icons: "^0.9.2"
    
    flutter_icons:
      android: "launcher_icon"
      ios: true
      image_path: "assets/icon/icon.png"
    
    • 第 2 步:
    flutter pub get
    

    【讨论】:

      猜你喜欢
      • 2020-08-18
      • 1970-01-01
      • 2021-02-24
      • 2021-05-12
      • 2019-04-07
      • 2020-10-25
      • 2016-09-12
      • 1970-01-01
      相关资源
      最近更新 更多