SharedStore.from constructor

SharedStore.from({
  1. SharedStoreReference? reference,
  2. String? id,
})

Creates a SharedStore from reference or id.

Implementation

factory SharedStore.from({SharedStoreReference? reference, String? id}) {
  if (reference != null) {
    return SharedStore.fromSharedReference(reference);
  }

  if (id != null) {
    return SharedStore(id);
  }

  throw MultiNullArguments(['reference', 'id']);
}