createWithoutData method Null safety

LCObject createWithoutData(
  1. String className,
  2. String objectId
)

Constructs a object in className of objectId.

The object corresponding to the objectId specified must already exists on the cloud.

Implementation

static LCObject createWithoutData(String className, String objectId) {
  if (isNullOrEmpty(className)) {
    throw ArgumentError.notNull(className);
  }
  if (isNullOrEmpty(objectId)) {
    throw ArgumentError.notNull(objectId);
  }
  LCObject object = _createByName(className);
  object._data.objectId = objectId;
  object._isDirty = false;
  return object;
}