Open issaloubani opened 9 months ago
Adding a widget as an icon to TabItem as follows (any type of widget will suffice):
TabItem<Widget>(icon: SvgPicture.asset(Assets.iconsConversation), title: "Home"),
will cause an exception even when specifying the icon type to Widget and not IconData. The bug is caused by the they following line in build_icon.dart :
Widget icon = Icon( item.icon, size: iconSize, color: iconColor, );
since the item.icon type will be considered an IconData even if specified as widget, this is fixed by adding the following check:
Widget icon = (item.icon is Widget) ? item.icon : Icon( item.icon, size: iconSize, color: iconColor, );
@issaloubani I was just about to fix this. Thanks! I'll be cloning your fork locally 🤣
@a-wallen Don't mention it 👍 . Happy to help.
When will this be merged with master?
Adding a widget as an icon to TabItem as follows (any type of widget will suffice):
TabItem<Widget>(icon: SvgPicture.asset(Assets.iconsConversation), title: "Home"),
will cause an exception even when specifying the icon type to Widget and not IconData. The bug is caused by the they following line in build_icon.dart :
since the item.icon type will be considered an IconData even if specified as widget, this is fixed by adding the following check: