store<K> method

  1. @override
Future<K> store<K>(
  1. dynamic entity
)
override

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 entities = await entitiesFor(entity.runtimeType);
  entities[keyOf(entity)] = entity;
  return keyOf(entity) as K;
}