diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d722ce..146e49c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [0.3.0] + column spacing and margin params + ## [0.2.0] added additional heights and cleaned up the margins the filter is now shown when you long press on a field header diff --git a/lib/ReusableDataGridW.dart b/lib/ReusableDataGridW.dart index 2360792..afab1a0 100644 --- a/lib/ReusableDataGridW.dart +++ b/lib/ReusableDataGridW.dart @@ -45,6 +45,9 @@ class ResusableDatagridW extends StatefulWidget { final double fontSize; + final double columnSpacing; + final double horizontalMargin; + ///[fields] definition of fields to display ///[lastSaveDate] change this field to update the list with new data (can't do a compare of thousands of records nicely) ResusableDatagridW({ @@ -62,7 +65,9 @@ class ResusableDatagridW extends StatefulWidget { this.selectName = "select", this.selectedIds, this.maxHeight, - required this.fontSize, + this.fontSize = 12, + this.columnSpacing = 10, + this.horizontalMargin = 10, }) : super(key: key); _ResusableDatagridW createState() => _ResusableDatagridW(); @@ -210,7 +215,9 @@ class _ResusableDatagridW extends State> { // border: Border.all(color: Colors.green), ), child: DataTable( - columnSpacing: 20, + columnSpacing: widget.columnSpacing, + horizontalMargin: widget.horizontalMargin, + dividerThickness: 0, showCheckboxColumn: false, dataRowMaxHeight: rowHeight, dataRowMinHeight: rowHeight, @@ -226,7 +233,8 @@ class _ResusableDatagridW extends State> { ), child: SingleChildScrollView( child: AtreeonPaginatedDataTable( - columnSpacing: 20, + columnSpacing: widget.columnSpacing, + horizontalMargin: widget.horizontalMargin, showCheckboxColumn: false, showFirstLastButtons: true, dataRowHeight: rowHeight, diff --git a/pubspec.yaml b/pubspec.yaml index 9d990e5..26f103b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: atreeon_datagrid_responsive description: A datagrid with sorting and filtering capabilities. It is also responsive to screen size. Fully Typed. -version: 0.2.0 +version: 0.3.0 homepage: https://atreeon.com repository: https://github.com/atreeon/atreeon_datagrid_responsive