SideMenuItemDataTile constructor

const SideMenuItemDataTile({
  1. required bool isSelected,
  2. required void onTap(),
  3. Widget? icon,
  4. String? title,
  5. TextStyle? titleStyle,
  6. TextStyle? selectedTitleStyle,
  7. String? tooltip,
  8. bool hasSelectedLine = true,
  9. Size selectedLineSize = const Size(Constants.itemSelectedLineWidth, Constants.itemSelectedLineHeight),
  10. double itemHeight = Constants.itemHeight,
  11. EdgeInsetsDirectional margin = Constants.itemMargin,
  12. BorderRadiusGeometry? borderRadius,
  13. Widget? selectedIcon,
  14. Color? highlightSelectedColor,
  15. Color? hoverColor,
  16. SideMenuItemBadgeBuilder? badgeBuilder,
  17. Decoration? decoration,
  18. ShapeBorder? shape,
  19. Clip clipBehavior = Clip.hardEdge,
})

Implementation

const SideMenuItemDataTile({
  required this.isSelected,
  required this.onTap,
  this.icon,
  this.title,
  this.titleStyle,
  this.selectedTitleStyle,
  this.tooltip,
  this.hasSelectedLine = true,
  this.selectedLineSize = const Size(
    Constants.itemSelectedLineWidth,
    Constants.itemSelectedLineHeight,
  ),
  this.itemHeight = Constants.itemHeight,
  this.margin = Constants.itemMargin,
  this.borderRadius,
  this.selectedIcon,
  this.highlightSelectedColor,
  this.hoverColor,
  this.badgeBuilder,
  this.decoration,
  this.shape,
  this.clipBehavior = Clip.hardEdge,
})  : assert(itemHeight >= 0.0),
      assert(icon != null || title != null),
      assert((highlightSelectedColor == null && decoration == null) ||
          (highlightSelectedColor != null
              ? decoration == null
              : decoration != null
                  ? highlightSelectedColor == null
                  : true)),
      super();