DrawerItem constructor

const DrawerItem({
  1. IconData? icon,
  2. String? text,
  3. Color? splashColor,
  4. Color? normalForegroundColor,
  5. Color? checkedForegroundColor,
  6. Color? checkedBackgroundColor,
  7. Decoration? backgroundDecoration,
  8. ShapeBorder? selectCustomBorder,
  9. bool? checked,
  10. GestureTapCallback? onTap,
  11. EdgeInsets? padding,
  12. FontWeight? fontWeight,
  13. double? fontSize,
})

Implementation

const DrawerItem({
  this.icon,
  this.text,
  this.splashColor,
  Color? normalForegroundColor,
  this.checkedForegroundColor,
  Color? checkedBackgroundColor,
  this.backgroundDecoration,
  ShapeBorder? selectCustomBorder,
  bool? checked,
  this.onTap,
  EdgeInsets? padding,
  FontWeight? fontWeight,
  double? fontSize,
})  : normalForegroundColor =
          normalForegroundColor ?? const Color(0xff414141),
      checkedBackgroundColor =
          checkedBackgroundColor ?? const Color(0x779e9e9e),
      selectCustomBorder = selectCustomBorder ??
          const RoundedRectangleBorder(
              borderRadius: BorderRadius.only(
            topRight: Radius.circular(100),
            bottomRight: Radius.circular(100),
          )),
      checked = checked ?? false,
      padding = padding ?? const EdgeInsets.all(16),
      fontWeight = fontWeight ?? FontWeight.normal,
      fontSize = fontSize ?? 14.0;