add method

Implementation

@override
Future<AssignmentModel> add(AssignmentModel value) {
  return assignmentCollection
      .doc(value.documentID)
      .set(value
          .toEntity(appId: appId)
          .copyWith(
            timestamp: FieldValue.serverTimestamp(),
          )
          .toDocument())
      .then((_) => value)
      .then((v) async {
    var newValue = await get(value.documentID);
    if (newValue == null) {
      return value;
    } else {
      return newValue;
    }
  });
}