MediaSet class

The parsed <field>.__media sibling: every MediaItem the server could resolve for a medialibrary-backed field's raw uuid token(s).

An entry missing uuid or url is dropped rather than failing the whole set — a stale or since-deleted media row is the server's problem to clean up, not a reason to blank every other attachment on the record. Unknown keys are ignored, the same scalar-widening licence opt gives every other schema parser in this package.

Constructors

MediaSet({required List<MediaItem> items})
const
MediaSet.fromJson(List json, String path)
json is the <field>.__media sibling itself — a list of media maps.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
items List<MediaItem>
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

of(ResourceRecord record, String field) MediaSet?
Reads the flat <field>.__media sibling off record. Null when the field carries no such sibling (not a medialibrary field, or the field is simply absent from this record) or the sibling is not a list — both read as "nothing to show" rather than a parse failure, since a screen with no media field configured is the ordinary case, not an error one.