fromOrNull static method

ReferencedModel? fromOrNull(
  1. BaseModel? another
)

Constructs a new instance of ReferencedModel, from the fields of another instance. Returns null if another is null or if the conversion fails.

Implementation

@pragma('vm:prefer-inline')
static ReferencedModel? fromOrNull(
  BaseModel? another,
) {
  return fromJsonOrNull(another?.toJson())!;
}