且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何更改 Flutter 上的应用程序启动器图标?

更新时间:2023-01-25 20:38:58

Flutter Launcher Icons 旨在帮助快速生成适用于 Android 和 iOS 的启动器图标:https://pub.dartlang.org/packages/flutter_launcher_icons

Flutter Launcher Icons has been designed to help quickly generate launcher icons for both Android and iOS: https://pub.dartlang.org/packages/flutter_launcher_icons

  • 将包添加到您的 pubspec.yaml 文件(在您的 Flutter 项目中)以使用它
  • 在 pubspec.yaml 文件中指定要用于应用的图标的路径,然后选择是要为 iOS 应用、Android 应用还是两者都使用该图标.
  • 运行包
  • 瞧!默认启动器图标现已替换为您的自定义图标

我希望在 GitHub README 中添加一个视频来演示它

I'm hoping to add a video to the GitHub README to demonstrate it

可以在此处找到演示如何运行该工具的视频.

Video showing how to run the tool can be found here.

如果有人想提出改进建议/报告错误,请将其作为问题添加到 GitHub 项目.

If anyone wants to suggest improvements / report bugs, please add it as an issue on the GitHub project.

更新:自 2018 年 1 月 24 日星期三起,您应该能够在不覆盖 Flutter 项目中现有的旧启动器图标的情况下创建新图标.

Update: As of Wednesday 24th January 2018, you should be able to create new icons without overriding the old existing launcher icons in your Flutter project.

更新 2:从 v0.4.0(2018 年 6 月 8 日)开始,您可以为您的 Android 图标指定一个图像,为您的 iOS 图标指定一个单独的图像.

Update 2: As of v0.4.0 (8th June 2018) you can specify one image for your Android icon and a separate image for your iOS icon.

更新 3:从 v0.5.2(2018 年 6 月 20 日)开始,您现在可以为 Flutter 项目的 Android 应用添加自适应启动器图标

Update 3: As of v0.5.2 (20th June 2018) you can now add adaptive launcher icons for the Android app of your Flutter project