Taha Tesser
40dda2b4bb
Add DataColumn.headingRowAlignment for DataTable (#144006)
fixes [[`DataTable`] Unable to center the label of a DataColumn without side effects](https://github.com/flutter/flutter/issues/143340)
### Code sample
<details>
<summary>expand to view the code sample</summary>
```dart
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: MaterialApp(
home: Material(
child: DataTable(
columns: <DataColumn>[
DataColumn(
headingRowAlignment: MainAxisAlignment.center,
onSort: (int columnIndex, bool ascending) {},
label: const Text('Header'),
),
],
sortColumnIndex: 0,
rows: const <DataRow>[
DataRow(
cells: <DataCell>[
DataCell(Center(child: Text('Data'))),
],
),
],
),
),
),
);
}
}
```
</details>
### Center `DataColumn.mainAxisAlignment` without sort arrow

### Center `DataColumn.mainAxisAlignment` with sort arrow

2024-04-01 09:42:51 +00:00
..
2024-02-28 13:55:50 -08:00
2024-03-24 18:01:17 +00:00
2024-03-28 01:20:55 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-03-25 08:39:05 +00:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-03-01 12:44:29 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-02-12 10:07:51 -08:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-03-12 16:51:51 +00:00
2024-03-19 17:58:13 +00:00
2024-02-28 13:55:50 -08:00
2024-03-24 18:01:17 +00:00
2024-02-28 13:55:50 -08:00
2024-04-01 09:42:51 +00:00
2024-04-01 09:42:51 +00:00
2024-02-29 15:16:53 -08:00
2024-03-19 17:58:13 +00:00
2024-02-28 13:55:50 -08:00
2024-02-13 00:12:02 +00:00
2024-02-13 00:12:02 +00:00
2024-02-28 13:55:50 -08:00
2024-03-18 21:32:22 +00:00
2024-03-26 20:15:48 +00:00
2024-02-28 13:55:50 -08:00
2024-02-07 13:57:21 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-26 18:36:09 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-12 16:51:51 +00:00
2024-03-19 17:58:13 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-18 12:45:22 +00:00
2024-03-18 12:45:22 +00:00
2024-02-07 02:44:21 +00:00
2024-03-18 12:45:22 +00:00
2024-03-12 16:51:51 +00:00
2024-02-27 22:49:13 +00:00
2024-03-29 20:48:49 +00:00
2024-03-19 17:58:16 +00:00
2024-03-19 17:58:16 +00:00
2024-02-21 08:59:24 +00:00
2024-03-19 17:58:13 +00:00
2024-03-19 17:58:13 +00:00
2024-03-24 18:01:17 +00:00
2024-03-11 23:04:57 +00:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-13 18:07:59 +00:00
2024-03-27 16:43:10 -07:00
2024-03-28 01:20:55 +00:00
2024-03-19 17:58:13 +00:00
2024-03-27 16:43:10 -07:00
2024-03-28 22:22:20 +00:00
2024-02-12 10:07:51 -08:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-03-25 08:39:05 +00:00
2024-03-13 16:31:50 +00:00
2024-03-19 17:58:13 +00:00
2024-03-25 22:58:11 +00:00
2024-03-19 17:58:13 +00:00
2024-02-27 22:49:13 +00:00
2024-02-28 13:55:50 -08:00
2024-03-09 07:50:23 +00:00
2024-03-19 17:58:13 +00:00
2024-03-06 20:41:04 +00:00
2024-03-28 01:20:55 +00:00
2024-02-12 10:07:51 -08:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-03-24 18:01:17 +00:00
2024-03-28 17:56:09 +00:00
2024-02-28 00:17:20 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-07 07:19:26 +00:00
2024-03-01 06:40:47 +00:00
2024-03-06 20:41:04 +00:00
2024-02-28 13:55:50 -08:00
2024-02-28 13:55:50 -08:00
2024-03-19 17:58:13 +00:00
2024-03-18 21:32:22 +00:00
2024-02-23 19:02:22 +00:00
2024-02-23 19:02:22 +00:00
2024-03-28 01:20:55 +00:00
2024-02-21 00:34:11 +00:00