khanmujeeb687 / flutter_pinned_shortcut

MIT License
1 stars 5 forks source link

Bug iconAssetName doesn't work #1

Closed hm21 closed 1 year ago

hm21 commented 1 year ago

There is a bug when using a custom icon with the option “iconAssetName”. I found out that the problem is in the file “flutter_pinned_shortcut_method_channel.dart”, you only need to replace the following:

 return await methodChannel.invokeMethod("createPinnedShortcut", {
      "id": id,
      "shortLabel": label,
      "action": action,
      // Replace this with the next line => "iconAssetName": iconAssetName,
      "icon": iconAssetName, 
    });

Alternatively, you can change it in the file “PinnedShortcutUtil.java”.

khanmujeeb687 commented 1 year ago

Hello Alex,

Thank you so much for reporting this bug. This issue will be fixed in the next version that will release tomorrow.

On Sat 10. Dec 2022 at 4:53 PM, Alex Frei @.***> wrote:

There is a bug when using a custom icon with the option “iconAssetName”. I found out that the problem is in the file “flutter_pinned_shortcut_method_channel.dart”, you only need to replace the following:

return await methodChannel.invokeMethod("createPinnedShortcut", {

  "id": id,

  "shortLabel": label,

  "action": action,

  // Replace this with the next line => "iconAssetName": iconAssetName,

  "icon": iconAssetName,

});

Alternatively, you can change it in the file “PinnedShortcutUtil.java”.

— Reply to this email directly, view it on GitHub https://github.com/khanmujeeb687/flutter_pinned_shortcut/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOBJ2JBWEWNQBUFFNDK3M5LWMSROJANCNFSM6AAAAAAS2K24YM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

khanmujeeb687 commented 1 year ago

Hey @hm21 The issue has been fixed in version 0.0.4. Happy coding :)