fluttercommunity / fluttercommunity/flutter_launcher_icons

Icon change is not working for MacOS[BUG]

Open
#564 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
2.1k
Forks
426
PR merge metrics
No merged PRs in 30d

Description

### :information_source: Info

Version: `e.g. v0.7.5`
flutter_launcher_icons: ^0.13.1

### :speech_balloon: Description

I changed the icon file and ran the commands below:
```
flutter pub get
flutter pub run flutter_launcher_icons
```
After I ran the app `flutter run -d MacOS` but the old icon is still in use. I even renamed the icon file to `old-icon` and the old icon is still showing. However, in the terminal I got the following error:
```
══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞════════════════════════════════════════════════════
The following assertion was thrown resolving an image codec:
Unable to load asset: "assets/images/icon.png".
Exception: Asset not found

When the exception was thrown, this was the stack:
#0 PlatformAssetBundle.loadBuffer (package:flutter/src/services/asset_bundle.dart:365:7)

#1 AssetBundleImageProvider._loadAsync (package:flutter/src/painting/image_provider.dart:754:16)

#2 MultiFrameImageStreamCompleter._handleCodecReady (package:flutter/src/painting/image_stream.dart:1005:3)

Image provider: AssetImage(bundle: null, name: "assets/images/icon.png")
Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#05844(), name: "assets/images/icon.png",
scale: 1.0)
════════════════════════════════════════════════════════════════════════════════════════════════════
```

### :scroll: Pubspec.yaml

```
flutter_launcher_icons:
android: "launcher_icon"
ios: true
image_path: "assets/images/icon-new.png"
min_sdk_android: 21 # android min sdk min:16, default 21
web:
generate: true
image_path: "assets/images/icon-new.png"
background_color: "#hexcode"
theme_color: "#hexcode"
windows:
generate: true
image_path: "assets/images/icon-new.png"
icon_size: 48 # min:48, max:256, default: 48
macos:
generate: true
image_path: "assets/images/icon-new.png"
```

We ask that you include your pubspec.yaml file as a common problem we have seen has been the pubspec.yaml file being incorrect

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the report with flutter pub get, flutter pub run flutter_launcher_icons, and flutter run -d MacOS using the shown macos configuration. Check whether the generated macOS icon reflects assets/images/icon-new.png and determine whether the reported old icon or missing asset error remains.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.