maheshj01/navbar_router

Use type `Widget` instead of `IconData` for class `NavbarItem`

Closed this issue · 2 comments

Is your feature request related to a problem? Please describe.
Use of iconData restricts user to provide 1 icon, however, in its uses at NavigationRailDestination and BottomNavigationBarItem, it can accept Widget data type.

Describe the solution you'd like
Using Widget data type instead.

Hey @alihaider12qw, Thanks for filing the issue. This is definitely something I would like to work on in the near future. Feel free to file a PR, If you are interested and I would be happy to review it.

I have added an optional child property to NavbarItem to test how it goes will be available in v0.7.1
passing widget directly instead of IconData, makes all the decoration and theming ineffective. This approach requires additional management on the client side, which seems to introduce extra work, defeating the purpose of having this package.

cc: @alihaider12qw I am open to your feedback