FileReference class

A reference to a file asset in the content management system.

This class represents a file reference that can be used in content models. It supports file assets like PDFs, documents, or other binary files.

Example:

final fileRef = FileReference(
  type: 'file',
  asset: ObjectReference(type: 'reference', ref: 'file-abc123'),
);
Annotations
  • @JsonSerializable()

Constructors

FileReference.new({required String type, required ObjectReference? asset})
FileReference.fromJson(Map<String, dynamic> json)
factory

Properties

asset ObjectReference?
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
final

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