Closed trulykasodiya-hub closed 5 months ago
/// Calls all the status listeners.
///
/// If listeners are added or removed during this function, the modifications
/// will not change which listeners are called during this iteration.
void notifyStatusListeners(PagingStatus status) {
assert(_debugAssertNotDisposed());
if (_statusListeners!.isEmpty) {
return;
}
final localListeners = List<PagingStatusListener>.from(_statusListeners!);
localListeners.forEach((listener) {
if (_statusListeners!.contains(listener)) {
listener(status);
}
}
Any reason we should expect _statusListeners
to never be null?
In case you dispose the paging_controller and a callback still happens this can be null.
It would be safer to use _statusListeners?
without any downside here?
I guess it is similar as in #246
@EdsonBueno I created a PR for your review
was this really fixed ? i'm still having the same issue in my crash analytics even thought i upgraded the package to the last version
Would be good to get @cornetthomas's PR merged in and a fix out for this. Very much a live issue right now @EdsonBueno.
Is this library still maintained? The PR looks very straightforward
Any progress on this fix ? Is there a chance to get this released ?
PagingController.notifyStatusListeners package:infinite_scroll_pagination/src/core/paging_controller.dart:170 Null check operator used on a null value