You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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)) {
returnContainer(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.
The text was updated successfully, but these errors were encountered: