Skip to content

Commit

Permalink
Merge pull request #12 from devoncarew/dividerColor
Browse files Browse the repository at this point in the history
use the 'Theme.dividerColor' color to separate rows
  • Loading branch information
devoncarew authored May 28, 2023
2 parents 4549900 + d72f18e commit 7d4a277
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.1

* Use the `Theme.dividerColor` color to separate rows.

## 0.3.0

* Make the row height configurable; add a `VTable.rowHeight` parameter.
Expand Down
10 changes: 7 additions & 3 deletions lib/vtable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class _VTableState<T> extends State<VTable<T>> {
children: [
createHeaderRow(colWidths),
Expanded(
child: createRowsListView(colWidths),
child: createRowsListView(context, colWidths),
),
],
);
Expand Down Expand Up @@ -237,9 +237,13 @@ class _VTableState<T> extends State<VTable<T>> {
);
}

ListView createRowsListView(Map<VTableColumn<dynamic>, double> colWidths) {
ListView createRowsListView(
BuildContext context,
Map<VTableColumn<dynamic>, double> colWidths,
) {
final theme = Theme.of(context);
final rowSeparator = BoxDecoration(
border: Border(top: BorderSide(color: Colors.grey.shade300)),
border: Border(top: BorderSide(color: theme.dividerColor)),
);

return ListView.builder(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: vtable
description: >-
A Flutter table widget featuring virtualization, sorting, and custom cell
rendering.
version: 0.3.0
version: 0.3.1
repository: https://github.com/devoncarew/vtable

topics:
Expand Down

0 comments on commit 7d4a277

Please sign in to comment.