GrayNormalButton top-level property

ButtonStyle GrayNormalButton
getter/setter pair

Implementation

ButtonStyle GrayNormalButton = ButtonStyle(
    padding: MaterialStateProperty.all(const EdgeInsets.all(0.0)),
    textStyle: MaterialStateProperty.all(const TextStyle(color:Color.fromRGBO(51, 51, 51, 1))),
    foregroundColor: MaterialStateProperty.resolveWith((states){
      if(states.contains(MaterialState.focused) && !states.contains(MaterialState.pressed)){
        return const Color.fromRGBO(51, 51, 51, 1);
      }else if(states.contains(MaterialState.pressed)){
        return const Color.fromRGBO(51, 51, 51, 0.9);
      }
      return const Color.fromRGBO(51, 51, 51, 0.8);
    }),
    backgroundColor: MaterialStateProperty.resolveWith((states){
      if(states.contains(MaterialState.pressed)){
        const Color.fromRGBO(51, 51, 51, 0.1);
      }
      return null;
    }),
    overlayColor: MaterialStateProperty.all(const Color.fromRGBO(11, 11, 11, 0.05))
);