Feature request: alignment inside cells.
Hi,
I propose you to add a missing feature which is the alignment inside a cell. currently, if you have multiple cells of different heights then the "content" is aligned on the top. To manage the alignment, we have to play with other components, but it will be way better if we can set up the alignment in the GridPlacement.
Here is an example, on the left you have the text "Volume" which I have aligned with other components, on the right you have the test "USD" which is put on the top of the cell by the LayoutGrid.
One idea would be to add some alignment parameters to the GridPlacement. Like this:
AlignmentGeometry? alignment
PS: and thanks for this fantastic layout.
BTW, I have created a sub-class of GridPlacement that does the job. It is a hack but it works. It is not a clean solution, but still... it do the job ;-)
class LayoutGridPlacement extends GridPlacement { LayoutGridPlacement({ super.key, required Widget child, super.columnStart, super.columnSpan = 1, super.rowStart, super.rowSpan = 1, AlignmentGeometry? alignment, }) : super(child: _getChild(child, alignment)) { //super(child: content); } static Widget _getChild(Widget content, AlignmentGeometry? alignment) { if (alignment == null) alignment = Alignment.centerLeft; return Container(alignment: alignment, child: content); } }