setInfo method

  1. @override
Future<void> setInfo(
  1. String name,
  2. String key,
  3. I info
)

Sets the partition info indexed by key.

  • name: The partition name
  • key: The key
  • info: The info

Implementation

@override
Future<void> setInfo(String name, String key, I info) {
  final box = _adapter.box<O>(name);

  if (box != null) {
    final entity = box.get(key.hashCode);
    if (entity != null) {
      _writeInfo(entity, info);
      box.put(entity, mode: PutMode.update);
    }
  }

  return Future.value();
}