store<K> method
Stores an entity in this Box. The entity is persisted if this Box implementation is persistent.
Implementation
@override
Future<K> store<K>(dynamic entity) async {
var connection = await _connect();
var entitySupport = registry.lookup(entity.runtimeType);
var documentType = entitySupport.name;
var key = entitySupport.getKey(entity);
_verifyNoCompositeKey(key);
var document = entitySupport.serialize(entity);
await connection.patch(documentType, key, document);
return key as K;
}