leftButton method
Widget
leftButton(
- _InputNumberModel model
)
Implementation
Widget leftButton(_InputNumberModel model) {
return Container(
width: leftButtonWidth ?? buttonWidth,
height: height,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(topLeft: borderRadius.topLeft, bottomLeft: borderRadius.bottomLeft),
),
child: TextButton(
onPressed: enable ? () => model.onReductionClick() : null,
child: Icon(
leftIcon ?? Icons.remove,
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(leftButtonBackgroundColor ?? Color(0xffF5F7FA)),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.only(topLeft: borderRadius.topLeft, bottomLeft: borderRadius.bottomLeft),
),
),
),
),
);
}