button method

Widget button(
  1. RightClickOptions option
)

Implementation

Widget button(RightClickOptions option){
  return InkWell(
    onHover: (hover){
      if(hover){
        hoverdOn = option;
      }
      else{
        hoverdOn = null;
      }
      setState(() {});
    },
    onTap: (){
      widget.function(option);
    },
    child: Container(
      color: hoverdOn == option?Colors.blue[900]:Colors.transparent,
      padding: const EdgeInsets.only(left:10,right:10),
      height: 25,
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Text(
            option.toString().replaceAll('RightClickOptions.', '').replaceAll('_', ' ').toUpperCase(),
            style: widget.style
          ),
          Text(
            commands(option),
            style: widget.style
          ),
      ],),
    ),
  );
}