asRelationship<R extends Relationship> method

R asRelationship<R extends Relationship>()

Implementation

R asRelationship<R extends Relationship>() {
  final rel = _parse.relationship(json);
  if (rel is R) return rel;
  throw FormatException('Invalid relationship type');
}