Flutter Icon losing image quality - flutter

i'm using flutter_launcher_icons to generate a icon on my flutter application
here's my yaml
flutter_icons:
image_path: "assets/images/icon_launcher.png"
adaptive_icon_background: "assets/images/icon_launcher_background.png"
adaptive_icon_foreground: "assets/images/icon_launcher_foreground.png"
# adaptive_icon_foreground: "assets/images/icon_launcher_foreground2.png"
android: true
ios: "AppIcon"
remove_alpha_ios: true
and i'm running
flutter pub get
flutter pub run flutter_launcher_icons:main
but my icon is losing quality, what should i do, i already tried with different images and sizes

Related

flutter launcher icon does not change

I have downloaded a sample app project and now I want to change its icon. I have installed the flutter_launcher_icons package.
I added this to pubspec.yaml file
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: "^0.11.0"
flutter_icons:
android: true
ios: true
image_path: "assets/icon/logo.png"
remove_alpha_ios: true
min_sdk_android: 21
Run the following commands
flutter pub get
flutter pub run flutter_launcher_icons
It gives me success message
════════════════════════════════════════════
FLUTTER LAUNCHER ICONS (v0.11.0)
════════════════════════════════════════════
• Creating default icons Android
• Overwriting the default Android launcher icon with a new icon
• Overwriting default iOS launcher icon with new icon
Creating Icons for Web...
⚠️Requirements failed for platform Web. Skipped
Creating Icons for Windows...
⚠️Windows config is not provided or windows.generate is false. Skipped...
⚠️Requirements failed for platform Windows. Skipped
Creating Icons for MacOS...
⚠️Requirements failed for platform MacOS. Skipped
✓ Successfully generated launcher icons
But When I install the app all I see is the old icon.
What might be the cause of the problem?
change your above code to
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/logo.png"
as you did before run the commands
flutter pub get
flutter pub run flutter_launcher_icons:main
and then remove your application from android device/emulator.
run your application again and the icon will be changed..

Flutter, cannot show application icon using flutter_launcher_icons

Once a while, I have temporarily set icon A as the app icon and is was successfully set in Android device. Now I would like to change to icon B, I added the ico file to the project, modified pubspec.yaml (letter cases are correct), update dependencies (actually I restarted Android Studio) and build. The app icon still remains the old icon A. Moreover, I build the app directly to my iPhone through XCode, the app icon is still the flutter icon.
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: "^0.11.0"
flutter_icons:
android: true
ios: true
image_path: "images/AST.ico"

error with flutter flutter_launcher_icons

I'm trying to use the error with flutter flutter_launcher_icons plugin to change the launcher icons.
Before I replaced the icons in the folder but this time I want to use this plugin made for that, but I get an error when I run:
flutter pub run flutter_launcher_icons:main
Here is the error:
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
shared_preferences: ^2.0.12
google_fonts: ^2.2.0
flutter_screenutil: ^5.0.3
animated_text_kit: ^4.2.1
shake: ^2.0.0
shake_event: ^0.0.9
flutter_launcher_icons: ^0.9.2
flutter_icons:
image_path_android: "assets/icone-appi.png"
image_path_ios: "assets/icone-appi.png"
android: true
ios: true
I tried to modify the spaces in the writing, but nothing changes.
I thought it would be easier to set up, but I can't find the error.
Thank you for your help
1. Set up the config FIle
add your logo file (ex: logo.png) into assets folder, you have to create the folder first
add flutter_launcher_icons packages in your pubspec.yaml
add a line like this to your package's pubspec.yaml
dev_dependencies:
flutter_launcher_icons: ^0.9.2
flutter_icons:
android: true
ios: true
iamge_path: "assets/logo.png"
2. Run the package
After setting up the configuration, all that is left to do is run the package in the terminal.
flutter pub get
flutter pub run flutter_launcher_icons:main

Check that your config file `flutter_launcher_icons.yaml` has a `flutter_icons` section

any one have solution to this problem i am running flutter pub run flutter_launcher_icons:main
and it is not working for me
Your pubspec.yaml should be like this:
dev_dependencies:
flutter_launcher_icons: "^0.9.2"
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/icon.png"
Notice where flutter_launcher_icons was used and where
flutter_icons was used.
I just solved the same error you have, and it was something so simple that many of us do not realize it sometimes.
Verify that the terminal is in your project folder.
Try putting flutter_launcher_icons: any in the dev_dependencies: section like in the image.
Verify correct indentation in pubspec.yaml
click to see image
if you facing this problem
✗ ERROR: NoConfigFoundException
Check that your config file flutter_launcher_icons.yaml has a flutter_icons section
try this
uninstall the app from the phone or emulator
Go To Power Shell and run as Administrator
cd ( your project path )
flutter pub get
flutter pub run flutter_launcher_icons:main
flutter run
Just ... Restart android studio
run
flutter clean
flutter pub get
flutter pub run flutter_launcher_icons:main
flutter run

Flutter Launcher icon doesn't change the icon

I already type this to my terminal and the icon for my app didn't change
flutter pub get
flutter pub run flutter_launcher_icons:main
Make sure you've set the app icon path in android/app/src/main/AndroidManifest.xml
android:icon="#mipmap/ic_launcher"
Try below code hope its help to you.
Add below package in your pubspec.yaml file
flutter_launcher_icons: ^0.9.2
Add below code pubspec.yaml file
flutter_icons:
image_path: "assets/icon.png"
android: true
ios: true
then run below command
flutter pub run flutter_launcher_icons:main