Pierre
Pierre

Reputation: 57

Probleme with flutter launcher icons

I need help for the dependencies flutter_launcher_icons: ^0.7.0, I'm looking to insert an icon to my application from an image in.png

With an old program, the command runs perfectly. I changed folders, created a new Flutter project, but nothing works. I also made a clean flutter, without success

I performed flutter doctor -v and everything is fine.

Excuse me if the format is not perfect, this is my first question I'm asking here

Thank you in advance for your help

file:///E:/NexToYou/Google/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.7.0/lib/android.dart:207:45: Error: Getter not found: 'AVERAGE'. newFile = copyResize(image, e.size, -1, AVERAGE); ^^^^^^^

file:///E:/NexToYou/Google/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.7.0/lib/android.dart:207:25: Error: Too many positional arguments: 1 allowed, but 4 found. Try removing the extra positional arguments. newFile = copyResize(image, e.size, -1, AVERAGE); ^

file:///E:/NexToYou/Google/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.0/lib/src/transform/copy_resize.dart:14:7: Context: Found this candidate, but the arguments don't match. Image copyResize(Image src, {int width, int height, ^^^^^^^^^^

file:///E:/NexToYou/Google/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.7.0/lib/android.dart:209:45: Error: Getter not found: 'LINEAR'. newFile = copyResize(image, e.size, -1, LINEAR); ^^^^^^

file:///E:/NexToYou/Google/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.7.0/lib/android.dart:209:25: Error: Too many positional arguments: 1 allowed, but 4 found. Try removing the extra positional arguments. newFile = copyResize(image, e.size, -1, LINEAR); ^

file:///E:/NexToYou/Google/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.0/lib/src/transform/copy_resize.dart:14:7: Context: Found this candidate, but the arguments don't match. Image copyResize(Image src, {int width, int height, ^^^^^^^^^^

file:///E:/NexToYou/Google/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.7.0/lib/android.dart:223:63: Error: Getter not found: 'AVERAGE'. newFile = copyResize(image, template.size, template.size, AVERAGE); ^^^^^^^

file:///E:/NexToYou/Google/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.7.0/lib/android.dart:223:25: Error: Too many positional arguments: 1 allowed, but 4 found. Try removing the extra positional arguments. newFile = copyResize(image, template.size, template.size, AVERAGE); ^

file:///E:/NexToYou/Google/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.0/lib/src/transform/copy_resize.dart:14:7: Context: Found this candidate, but the arguments don't match. Image copyResize(Image src, {int width, int height, ^^^^^^^^^^

file:///E:/NexToYou/Google/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.7.0/lib/android.dart:226:63: Error: Getter not found: 'LINEAR'. newFile = copyResize(image, template.size, template.size, LINEAR); ^^^^^^

pub finished with exit code 1enter image description here

strong text**

Upvotes: 4

Views: 7027

Answers (3)

Blarz
Blarz

Reputation: 414

In Jun 2021, I fixed it by upgrading to flutter_launcher_icons: "^0.9.0". Happy coding! I created a post with more details about this. https://betterprogramming.pub/2-ways-to-add-app-launcher-icons-in-flutter-e9fce30bc177

Upvotes: 0

Brinda Rathod
Brinda Rathod

Reputation: 2903

It resolves in

flutter_launcher_icons: "0.7.3"

Upvotes: 1

Doradus
Doradus

Reputation: 361

Add these two lines to your pubspec.yaml

dependency_overrides:
  image: 2.0.7

It seems flutter_launcher_icons is not compatible with the latest version image 2.1.0. Lower version of image works. issue#102

Upvotes: 5

Related Questions