Skip to content

Commit

Permalink
async sample fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-saplin committed Feb 1, 2024
1 parent 681a717 commit 4d1ac0e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## 2.5.11
- Fixed Async example (range selector)

## 2.5.10
- Added [DataTable2.decoratio]
- Added [DataTable2.decoration]
- Example with rows styles as rounded corners rectangles

## 2.5.9
Expand Down
2 changes: 1 addition & 1 deletion example/lib/data_sources.dart
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class DessertDataSourceAsync extends AsyncDataTableSource {
x.data.map((dessert) {
return DataRow(
key: ValueKey<int>(dessert.id),
selected: dessert.selected,
//selected: dessert.selected,
onSelectChanged: (value) {
if (value != null) {
setRowSelection(ValueKey<int>(dessert.id), value);
Expand Down
13 changes: 8 additions & 5 deletions example/lib/screens/async_paginated_data_table2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,14 @@ class _TitledRangeSelectorState extends State<_TitledRangeSelector> {

_values = widget.range;

Timer(
widget.titleToSelectorSwitch,
() => setState(() {
_titleVisible = false;
}));
Timer(widget.titleToSelectorSwitch, () {
if (!mounted) {
return;
}
setState(() {
_titleVisible = false;
});
});
}

@override
Expand Down

0 comments on commit 4d1ac0e

Please sign in to comment.