SidebarItem constructor

const SidebarItem({
  1. Key? key,
  2. required void onTap(),
  3. required Widget icon,
  4. required String text,
  5. required String keyIndex,
  6. required String selectedIndex,
  7. Color itemTextColor = Colors.black,
  8. Color darkItemTextColor = Colors.white,
  9. Color itemBackgroundColor = const Color(0xffDFDEE5),
  10. Color darkItemBackgroundColor = const Color(0xff39383D),
  11. Color selectedItemTextColor = Colors.black,
  12. Color darkSelectedItemTextColor = Colors.white,
})

Creates a SidebarItem.

The onTap, icon, text, keyIndex, itemTextColor, darkItemTextColor, and selectedIndex parameters must not be null.

Implementation

const SidebarItem(
    {super.key,
    required this.onTap,
    required this.icon,
    required this.text,
    required this.keyIndex,
    required this.selectedIndex,
    this.itemTextColor = Colors.black,
    this.darkItemTextColor = Colors.white,
    this.itemBackgroundColor = const Color(0xffDFDEE5),
    this.darkItemBackgroundColor = const Color(0xff39383D),
    this.selectedItemTextColor = Colors.black,
    this.darkSelectedItemTextColor = Colors.white});