Flutter-Neumorphic
Flutter-Neumorphic copied to clipboard
NeumorphicToggle style of thumb cannot change depth
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.