resfandiari / flutter_side_menu

Flutter's full customizable side menu has been used as a directory for Related Pages, Navigation Items, and more.
https://pub.dev/packages/flutter_side_menu
BSD 3-Clause "New" or "Revised" License
43 stars 22 forks source link

Possibility to add new Icons and TextStyle when selected. #5

Closed binhodev closed 1 year ago

binhodev commented 1 year ago

I created this pull to add the feature of adding new icons when the menu is selected, if the selectedIcon is null, the default icon will be kept, so is the behavior of the selectedTitleStyle.

SideMenuItemDataTile(
    isSelected: true,
    margin: EdgeInsetsDirectional.zero,
    borderRadius: const BorderRadius.only(
        topRight: Radius.circular(15),
        bottomRight: Radius.circular(15)),
    highlightSelectedColor: Colors.transparent,
    onTap: () {},
    title: 'Home',
    icon: const Icon(FontAwesomeIcons.lightGrid2),
    selectedIcon: const Icon(FontAwesomeIcons.grid2),
    selectedTitleStyle: const TextStyle(
        fontWeight: FontWeight.bold, fontSize: 18),
  ),

image

resfandiari commented 1 year ago

@silvinhofranca Thank you very much for making improvements to this library. Your PR will be checked and merged as soon as possible.