Skip to content

Commit

Permalink
Released version 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
atreeon committed Feb 26, 2024
1 parent df1f5f7 commit dbf6bc3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 11 additions & 3 deletions lib/ReusableDataGridW.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ class ResusableDatagridW<T> 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({
Expand All @@ -62,7 +65,9 @@ class ResusableDatagridW<T> 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<T> createState() => _ResusableDatagridW();
Expand Down Expand Up @@ -210,7 +215,9 @@ class _ResusableDatagridW<T> extends State<ResusableDatagridW<T>> {
// border: Border.all(color: Colors.green),
),
child: DataTable(
columnSpacing: 20,
columnSpacing: widget.columnSpacing,
horizontalMargin: widget.horizontalMargin,
dividerThickness: 0,
showCheckboxColumn: false,
dataRowMaxHeight: rowHeight,
dataRowMinHeight: rowHeight,
Expand All @@ -226,7 +233,8 @@ class _ResusableDatagridW<T> extends State<ResusableDatagridW<T>> {
),
child: SingleChildScrollView(
child: AtreeonPaginatedDataTable(
columnSpacing: 20,
columnSpacing: widget.columnSpacing,
horizontalMargin: widget.horizontalMargin,
showCheckboxColumn: false,
showFirstLastButtons: true,
dataRowHeight: rowHeight,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit dbf6bc3

Please sign in to comment.