save method

Future<ParseResponse> save()

Saves the current object online

Implementation

Future<ParseResponse> save() async {
  final ParseResponse childrenResponse = await _saveChildren(this);
  if (childrenResponse.success) {
    ParseResponse response;
    if (objectId == null) {
      response = await create();
    } else if (_isDirty(false)) {
      response = await update();
    }

    if (response != null) {
      if (response.success) {
        _savingChanges.clear();
      } else {
        _revertSavingChanges();
      }
      return response;
    }
  }
  return childrenResponse;
}