Closed wer-mathurin closed 1 year ago
This is a Workaround in the meantime. The UI will be updated when you will hover on different cells. But still think this can be more useful if this can be done on the Row level.
Using this resolve the issue when your mouse is over something render (so if the text is small, it will detect hover only on the Text.
DataCell(
MouseRegion(
onEnter: (event) {
if (hoveredRow != index) {
hoveredRow = index;
notifyListeners();
}
},
onExit: (event) {
hoveredRow = null;
notifyListeners();
},
child: builder.call(data, i, index == hoveredRow),
),
),
Do you have a working example? You can open a PR and try demonstrating the feature via /examples
The idea is to be able to show actions over a row like Gmail
The idea is to have an API like this
With this we will be able to call something like this (not real code...but just to show the possibilities !!!
So the builder will be called and it can decided to draw actions base on the hovered flag :-)