[two_dimensional_scrollables] Add the ability to build a custom row layout
- Dominant language
- Dart
- Stars
- 179k
- Forks
- 31.1k
- PR merge metrics
- PR metrics pending
Description
### Use case
It should allow developers to create a custom "template" for the entire row that is being built, for example, in the buildRow method, I need to add a InkWell to the entire row, so it could be nice if I could write:
```dart
TableSpan(
backgroundDecoration: decoration,
cursor: SystemMouseCursors.click,
extent: rowSpanExtent,
builder: (context, layout) => Ink(
child: InkWell(
onTap: () => print("tap!"),
child: layout,
)
),
recognizerFactories: {
TapGestureRecognizer: GestureRecognizerFactoryWithHandlers(
() => TapGestureRecognizer(),
(TapGestureRecognizer t) => t.onTap = () => debugPrint('Tap row $index'),
),
},
)
```
### Proposal
The same could be done for column builders. I tried to modify it by myself, but the only code that renders something I could find is `cell.layout()` in the `table.dart` file:
```dart
final BoxConstraints cellConstraints = BoxConstraints.tightFor(
width: mergedColumnWidth ?? standardColumnWidth,
height: mergedRowHeight ?? standardRowHeight,
);
cell.layout(cellConstraints);
```
Someone can guide me where to modify it?
Contributor guide
Assessment
This issue has not been assessed yet.