79723714

Date: 2025-08-03 00:03:59
Score: 0.5
Natty:
Report link

You can align the content of the table by wrapping the content within the TableCell with a Container and then setting the appropriate Alignment.

A simple table would be as below:

enter image description here

Table(
    border: TableBorder.all(), // Show the border to see alignment better
    children: [
      TableRow(children: [
        TableCell(
          child: Container(
            alignment: Alignment.centerRight,
            child: Text("data1"),
          ),
        ),
        TableCell(
          child: Container(
            alignment: Alignment.centerLeft,
            child: Text("data2"),
          ),
        ),
        TableCell(
          child: Container(
            alignment: Alignment.center,
            child: Text("data3"),
          ),
        )
      ])
    ],
  ),
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Imaduddin