putAll method

Future<void> putAll(
  1. Map<String, dynamic> entries
)

Store multiple values at once (batch operation).

More efficient than multiple individual puts.

Example:

await db.putAll({
  'user:1': {'name': 'Alice'},
  'user:2': {'name': 'Bob'},
  'user:3': {'name': 'Charlie'},
});

Implementation

Future<void> putAll(Map<String, dynamic> entries) async {
  await _db.putBatch(entries);
  _keys.addAll(entries.keys);
  await _saveKeys();
}