set<TType> method

Future set<TType>(
  1. String key,
  2. TType? value
)

Implementation

Future set<TType>(
  String key,
  TType? value,
) async {
  if (value == null) {
    await _hiveBox?.delete(key);
  } else {
    final encodedValue = _encodeValue(value);
    _hiveBox?.put(key, encodedValue);
  }
}