failNext method

void failNext(
  1. VaultOperation operation,
  2. VaultException error, {
  3. String? key,
})

Makes the next call of operation throw error (once). With key, only the next call for that key fails (write, read, delete).

Implementation

void failNext(
  VaultOperation operation,
  VaultException error, {
  String? key,
}) => _failures[operation] = (error, key);