isRecordsLoading method
- @visibleForTesting
- @protected
- LoadingKey loadingKey, {
- Query? query,
inherited
Tells whether the loading of records is identified by the loadingKey
and the query is currently being executed.
Implementation
@visibleForTesting
@protected
bool isRecordsLoading(LoadingKey loadingKey, {Query? query}) {
final loadMeta = _loadingDescribers[loadingKey];
if (loadMeta == null) {
return false;
}
if (query == null) {
return !loadMeta.completer.isCompleted;
} else {
return !loadMeta.completer.isCompleted && query == loadMeta.query;
}
}