diff --git a/CHANGELOG.md b/CHANGELOG.md index cd3cd9c..191fc9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/example/lib/data_sources.dart b/example/lib/data_sources.dart index 20ca5ce..68f72c7 100644 --- a/example/lib/data_sources.dart +++ b/example/lib/data_sources.dart @@ -286,7 +286,7 @@ class DessertDataSourceAsync extends AsyncDataTableSource { x.data.map((dessert) { return DataRow( key: ValueKey(dessert.id), - selected: dessert.selected, + //selected: dessert.selected, onSelectChanged: (value) { if (value != null) { setRowSelection(ValueKey(dessert.id), value); diff --git a/example/lib/screens/async_paginated_data_table2.dart b/example/lib/screens/async_paginated_data_table2.dart index d7a9d41..1d9ce1f 100644 --- a/example/lib/screens/async_paginated_data_table2.dart +++ b/example/lib/screens/async_paginated_data_table2.dart @@ -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