RelationListScreen class

One relation's full, paginated child rows — what RelationSectionWidget's "See all" opens.

A plain widget with no router dependency, like ResourceListScreen: the host decides how it is reached. Shares that screen's skeleton (CardListSkeleton) and scrolled, paginated body (PaginatedCardList) — the endpoint serves the identical {data, meta} envelope — and adds only the pieces that differ: the title and the scroll-triggered loadMore().

Search and sort (P11) mirror ResourceListScreen's chrome and gating: a search field only when the descriptor's search.enabled, a sort menu only when its sorts is non-empty — an undeclared relation, or a server predating P11 (which parses as one), gets the plain list it always had. The embedded RelationSectionWidget stays plain either way: the full screen is where list controls live.

Row writes (P9): when childResource is passed — the host resolves it from its already-loaded panel as panel.resource(relation.resource) — the screen draws, per that resource's published permissions block, an Add affordance (create), and per-row edit (update) and delete (delete). A null childResource — a relation whose descriptor published no resource key, an old server, or a host that never wired it — draws nothing: absence means unavailable, never a control the server will 404. The permissions come from the CHILD resource's own block, never invented here; the server derives both from the same policies, so they cannot disagree.

Inheritance

Constructors

RelationListScreen({required RelationListProvider provider, ResourceSchema? childResource, PanelBodyBuilder? stateBuilder, FilamentStrings strings = const FilamentStrings(), void onRecordTap(ResourceRecord record)?, FilamentFilePicker? filePicker, FieldRegistry? fieldRegistry, FilamentWidgetRegistry? widgetRegistry, Key? key})
const

Properties

childResource ResourceSchema?
The schema of the resource this relation's rows belong to — its form renders the row create/edit form, its permissions gate every write affordance. Null keeps the list read-only; see the class doc.
final
fieldRegistry FieldRegistry?
Forwarded to relation-owned create/edit forms so custom field builders work there exactly as they do on a top-level resource form.
final
filePicker FilamentFilePicker?
Forwarded to the row create/edit form, exactly as a host forwards it to ResourceFormScreen — without it a file field on the child form renders read-only, same as there.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onRecordTap → void Function(ResourceRecord record)?
final
provider RelationListProvider
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stateBuilder PanelBodyBuilder?
final
strings FilamentStrings
final
widgetRegistry FilamentWidgetRegistry?
Application-owned widgets inserted into this screen's named slots.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<RelationListScreen>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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