Shows a separator even when separated Icons are left to true. [bug]
opened this issue · comments
Deleted user commented
NumberInputWithIncrementDecrement(
controller: TextEditingController(),
min: 1,
enabled: true,
decIcon: Icons.remove,
incIcon: Icons.add,
separateIcons: true,
// decIconDecoration: BoxDecoration(
// border: Border.all(
// color: Colors.transparent,
// style: BorderStyle.none)),
decIconColor: Colors.red[400],
incIconColor: greenHeading,
widgetContainerDecoration:
BoxDecoration(
border: Border.all(
color: Colors
.transparent)),
numberFieldDecoration:
InputDecoration(
enabledBorder:
UnderlineInputBorder(
borderSide: BorderSide(
color: headingtextColor),
),
focusedBorder:
UnderlineInputBorder(
borderSide: BorderSide(
color: headingtextColor),
),
fillColor: Colors.transparent,
),
scaleHeight: 0.8,
scaleWidth: 0.8,
max: 50,
),
Deleted user commented
Turns out you have to explicitly override incIconDecoration
to get rid of the separator.
incIconDecoration: BoxDecoration(), \\or any other decoration you like.
Abhilash Chandran commented
Thanks for reporting @RazaShabbir-vrc. I verified the code and I am adding a black border to the bottom in the incIconDecoration
. This is to ensure the buttons are visibly separate. If you don't want to see any border, yes you will have to completely override the decoration. So I think your approach is correct. Feel free to reopen the issue if you want to discuss further any alternatives that you would expect.