Flutter-Neumorphic icon indicating copy to clipboard operation
Flutter-Neumorphic copied to clipboard

NeumorphicToggle style of thumb cannot change depth

Open romain-bajoit-iot-d opened this issue 4 years ago • 0 comments

The following code produce a NeumorphicToggle but the depth of the thumb is always the default depth value of the theme.

return NeumorphicToggle(
      style: NeumorphicToggleStyle(
        borderRadius: BorderRadius.circular(padding + radius),
        depth: 1,  // <- it works
      ),
      thumb: Neumorphic(
        style: NeumorphicStyle(
          depth: 1, // <- does not work
          boxShape: NeumorphicBoxShape.roundRect(BorderRadius.all(Radius.circular(radius))),
        ),
      ),
      ...
);

I should also add that putting the depth of the thumb to a negative value seems to have unexpected behavior.

romain-bajoit-iot-d avatar Nov 06 '20 10:11 romain-bajoit-iot-d