updateAllValue method

Future<void> updateAllValue(
  1. ValueCopyWith<E> update
)

修改全部

Implementation

Future<void> updateAllValue(ValueCopyWith<E> update) async {
  final box = await openBox();
  final keys = box.keys;
  await Future.forEach(keys, (element) async {
    final newValue = update(box.get(element) as E);
    await box.put(element, newValue);
  });
}