rightButton method

Widget rightButton(
  1. _InputNumberModel model
)

Implementation

Widget rightButton(_InputNumberModel model) {
  return Container(
    width: rightButtonWidth ?? buttonWidth,
    height: height,
    alignment: Alignment.center,
    decoration: BoxDecoration(
      borderRadius: BorderRadius.only(topRight: borderRadius.topRight, bottomRight: borderRadius.bottomRight),
    ),
    child: TextButton(
      onPressed: enable ? () => model.onAddClick() : null,
      child: Icon(
        rightIcon ?? Icons.add,
        color: enable ? (iconColor ?? Color(0xff606266)) : (iconDisableColor ?? Color(0xffE7EAEE)),
        size: iconSize ?? 20,
      ),
      style: ButtonStyle(
        padding: MaterialStateProperty.all(EdgeInsets.zero),
        minimumSize: MaterialStateProperty.all(Size(buttonWidth, height)),
        backgroundColor: MaterialStateProperty.all(rightButtonBackgroundColor ?? Color(0xffF5F7FA)),
        shape: MaterialStateProperty.all(
          RoundedRectangleBorder(
            borderRadius: BorderRadius.only(topRight: borderRadius.topRight, bottomRight: borderRadius.bottomRight),
          ),
        ),
      ),
    ),
  );
}