Flutter Launcher icon not getting changed?

后端 未结 7 2044
星月不相逢
星月不相逢 2021-02-13 04:35

Am new to Flutter. I gone through the flutter documentation and followed the steps to configure custom launcher icons for my flutter project but app Launcher icon is not getting

7条回答
  •  北荒
    北荒 (楼主)
    2021-02-13 05:28

    there is two way to update app icon

    1) first way

    dev_dependencies:
      flutter_test:
        sdk: flutter  
    
      flutter_launcher_icons: "^0.7.5"
    
    flutter_icons:
      image_path: "icon/appicon.png"
      android: true 
      ios: true
    

    run this two command

    flutter pub get
    
    flutter pub run flutter_launcher_icons:main
    

    2) if above not work then below solutions (change in native)

    you can change appicon from Image Asset, right click on main folder of your project structure and go new -> Image Asset , now just select your icon and finish it, Android studio will generate all necessary icons for you.

    similarly you can change appicon for ios, go

    ios -> Runner -> Assets.xcassets -> Appicon.appiconset

    then replace icons with your new icons

    that's it!

提交回复
热议问题