We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 51101ba + a4045a6 commit 7cfe7a4Copy full SHA for 7cfe7a4
lib/paging.dart
@@ -91,13 +91,17 @@ class _PaginationState<T> extends State<Pagination<T>> {
91
if (list.isEmpty) {
92
_isEndOfList = true;
93
}
94
- setState(() {
95
- _list.addAll(list);
96
- });
+ if (mounted) {
+ setState(() {
+ _list.addAll(list);
97
+ });
98
+ }
99
}).catchError((error) {
- _isEndOfList = true;
100
101
102
+ _isEndOfList = true;
103
104
105
print(error);
106
if (widget.onError != null) {
107
widget.onError(error);
0 commit comments