ResourceViewProvider class

Loads one record for the detail screen.

Holds the resource alongside the record because the screen needs both: the schema supplies the infolist and the title, the record supplies the values and its own per-record permissions. The two permission blocks are deliberately not merged here — see ResourceRecord.permissions.

Inheritance

Constructors

ResourceViewProvider({required ResourceDataSource source, required ResourceSchema resource, required Object id})

Properties

errorMessage String?
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
id Object
final
isUnauthenticated bool
True when the load failed on a 401 — see FilamentTransportException.statusCode.
no setter
record ResourceRecord?
no setter
resource ResourceSchema
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status LoadStatus
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
delete() Future<WriteResult>
Deletes this record. A pass-through, not a state change: the outcome decides whether the screen pops or stays, and either way this provider's own _record/_status describe a record that either no longer exists or was never touched — nothing here needs updating either way.
dispose() → void
Discards any resources used by the object.
inherited
load({bool keepPrevious = false}) Future<void>
Loads the record.
loadRelation(RelationDescriptor relation, {int page = 1}) Future<PaginatedRecords>
One relation's rows for the record this provider holds — the same read path load() uses, against a sibling URL. A pass-through, not a state change: RelationSectionWidget owns its own loading/failure state for it, the same division ResourceListProvider keeps between itself and the screen that renders its pages.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
runAction(RecordAction action) Future<ActionResult>
Run action against this record and, on success, re-fetch — an action's most common effect is changing exactly the permissions and actions this provider is holding, so the pre-run record is stale the moment the call succeeds.
toString() String
A string representation of this object.
inherited

Operators

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