ResourceListProvider class

Owns one resource's list: records, search term, active sort, pagination.

Debouncing lives in the screen, not here — a provider owning a timer is untestable without pumping fake async, and the screen is where the keystroke actually arrives.

Inheritance

Constructors

ResourceListProvider({required ResourceDataSource source, required ResourceSchema resource})

Properties

activeSort ResourceSort?
no setter
errorMessage String?
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
hasMore bool
no setter
isLoadingMore bool
no setter
isUnauthenticated bool
True when the load failed on a 401 — see FilamentTransportException.statusCode.
no setter
loadMoreFailed bool
no setter
records List<ResourceRecord>
no setter
resource ResourceSchema
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchTerm String
no setter
status LoadStatus
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object.
inherited
load() Future<void>
loadMore() Future<void>
Appends the next page. A failure here keeps whatever is already on screen — losing a scrolled list because page four timed out is worse than the missing page — but loadMoreFailed still flips, so the trailing row can show a retry instead of a spinner that never resolves into anything the user is told about.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
refresh() Future<void>
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
sortBy(ResourceSort sort) Future<void>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited