hasPendingRotation method

Future<bool> hasPendingRotation(
  1. String localId
)

Whether a passphrase rotation for localId was interrupted and has not been finished.

True only between the moment rotatePassphrase commits to a new key and the moment it finishes. openDatabase and reopenDatabase finish such a rotation before they open anything, so an app that simply opens as usual never has to act on this — it exists so one can tell the user what happened.

if (await passnote.hasPendingRotation('household')) {
  // Finished automatically on the next open; say so rather than worry.
}

Implementation

Future<bool> hasPendingRotation(String localId) async =>
    await _keyStore.getKey(_rotationEntryKey(localId)) != null;