1、在pubspec.yaml中安装插件
dev_dependencies:
flutter_launcher_icons: 0.9.0
2、在pubspec.yaml中加入以下代码
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/img/icon.png"
3、在命令行中执行
flutter packages pub run flutter_launcher_icons:main