exclude method

Future<void> exclude(
  1. String path
)

Mark path excluded from backup. BEST-EFFORT: a failure NEVER blocks boot — the wallet still works; the only loss is a backup would carry the encrypted (cross-device-unusable) DB. A no-op off iOS.

Implementation

Future<void> exclude(String path) async {
  if (!(_isIOS ?? Platform.isIOS)) return;
  try {
    await _channel.invokeMethod<bool>('excludeFromBackup', path);
  } catch (_) {
    // Best-effort — never fail boot on a backup-flag write (a missing native
    // handler, an older OS, a transient FS error). The DB is encrypted regardless.
  }
}