setImage method
Implementation
Future<void> setImage(String image) async {
String? imageAbsolutePath = await Utils.getIcon(image);
bool result = await channel?.invokeMethod(_kSetImage, {
_kMenuIdKey: menuId ?? -1,
_kMenuItemIdKey: menuItemId ?? -1,
_kImageKey: imageAbsolutePath,
});
if (result) {
this.image = image;
this.imageAbsolutePath = imageAbsolutePath;
}
}