data_table_2 与 flutter 官方 DataTable 的区别 https://blog.csdn.net/ken2232/article/details/143181634
flutter 数据表增强库 `data_table_2` 错误问题 记录 (****) https://blog.csdn.net/ken2232/article/details/143180018
data_table_2 与 flutter 官方 DataTable 的区别
其他类的区别,查看方法,可以参考如下:
DataRow2 class
https://pub.dev/documentation/data_table_2/latest/data_table_2/DataRow2-class.html
Extension of standard DataRow, adds row level tap events. Also there're onSecondaryTap and onSecondaryTapDown which are not available in DataCells and which can be useful in Desktop settings when a reaction to the right click is required.
DataColumn2 class
https://pub.dev/documentation/data_table_2/latest/data_table_2/DataColumn2-class.html
Extension of stock DataColumn, adds the capability to set relative column size via size property
data_table_2 library
https://pub.dev/documentation/data_table_2/latest/data_table_2/DataRow2-class.html
- Classes
- AsyncDataTableSource
- AsyncPaginatedDataTable2
- AsyncPaginatedDataTable2State
- AsyncRowsResponse
- DataColumn2
- DataRow2
- DataTable2
- PaginatedDataTable2
- PaginatedDataTable2State
- PaginatorController
- SyncedScrollControllers
- SyncedScrollControllersState
- Enums
- ColumnSize
- PageSyncApproach
- SelectionState
- SourceState
- Constants
- defaultRowsPerPage
- Properties
- dataTableShowLogs
说明:
1. 到 2024/10 为止,data_table_2 也只是更改了 22 个类而已。
2. 对原生类做了少量的修改,由此,应该也会对框架做了某些修改吧?否则,如何来处理那些新增加的类的特性呢?
3. 从 flutter 原生 DataTable 的源文件,修改成 data_table_2的,一般只需加后缀 2即可。
4. 由于类属性有所变动,因此,两种源代码之间,当使用了 data_table_2 的新特性之后,那么,这两种源代码之间,相互转换则还是需要调整的。因此,应该视为是采用相同语言 dart 的两种不兼容的代码。