Open npateras opened 6 months ago
Can you demonstrate it in a picture?
So in DataRow2, you can set a color with MaterialStateProperty
which changes the background color of the row when hovering over using the hover property of MaterialStateProperty
. Now I am asking if it's possible to be done for decoration too so we can have rounded corners instead, like this:
Current: Left, Suggestion: Right
Code example:
DataRow2(
decoration: MaterialStateProperty.resolveWith(
if (states.contains(MaterialState.hovered)) {
return Container(color: Colors.grey)
}
)
)
Please make it so the decoration property in DataRow2 to be able to take MaterialStateProperty similar to color.
Reason: So I came across a problem and I couldn't figure out how to do it with DataTable. I wanted when hovering over a row to show a color around the row. Now you might think this can be achieved with color property, and you are right, but not quite because I wanted the hovered color to have a corner radius! Which can be achieved with decoration, but decoration doesn't have MaterialStateProperty. Additionally, there could be an option to add an animation when the hover effect appears.