Flutter自动生成安卓和IOS图标
-
用这个库自动生成
-
首先添加依赖
dev_dependencies: flutter_launcher_icons: flutter_icons: android: "launcher_icon" ios: true image_path: "assets/icon.png"
-
然后添加一张1024*1024像素的图到assets目录下,命名为icon.png
-
打开终端
flutter packages get flutter packages pub run flutter_launcher_icons:main
-
安卓图标目录是android\app\src\main\res
-
IOS目录为ios\Runner\Assets.xcassets\AppIcon.appiconset
-
大功告成!