ParseRelation<T extends ParseObject> constructor

ParseRelation<T extends ParseObject>({
  1. required ParseObject parent,
  2. required String key,
})

Implementation

ParseRelation({required ParseObject parent, required String key}) {
  if (!parent.containsKey(key)) {
    throw 'Invalid Relation key name';
  }
  _targetClass = parent.get<ParseRelation>(key)!.getTargetClass;
  _parent = parent;
  _key = key;
  _parentObjectId = parent.objectId!;
}