EncryptedPlacesService class

Service for managing encrypted places.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

addEncryptedPlace(Place place, BuildContext context, Widget child) Future<bool>
Add a single encrypted place. Uses local cache to avoid fetching from server if available. IMPORTANT: If cache is empty, ensures security key is available before fetching existing places to prevent data loss.
addEncryptedPlacesBatch(List<Place> places, BuildContext context, Widget child) Future<bool>
Add multiple encrypted places in a single batch operation. More efficient than calling addEncryptedPlace multiple times. Uses local cache to avoid fetching from server if available.
clearCache() → void
Clear the cache.
clearSecurityKeyCache() → void
Clear security key cache (call when key is added/removed).
deleteEncryptedPlace(String placeId, BuildContext context, Widget child) Future<bool>
Delete an encrypted place by ID. Ensures security key is available before modifying encrypted data.
ensureSecurityKey(BuildContext context, Widget child) Future<bool>
Prompt user for security key if not available. Returns true if key is now available, false otherwise. Uses session caching to avoid repeated checks. Uses dialog mode instead of full-screen to avoid navigation issues on cancel.
fetchEncryptedPlaces({bool forceRefresh = false}) Future<List<Place>>
Read encrypted places from Pod.
hasEncryptionSetup() Future<bool>
Check if verification key exists (meaning encryption was set up).
initialize() Future<void>
Initialize service - load persistent flags. Call this once at app startup for better performance.
isSecurityKeyAvailable() Future<bool>
Check if security key is available for encryption operations. Uses cache to avoid repeated KeyManager calls.
mergeImportedEncryptedPlaces(List<Place> importedPlaces, BuildContext context, Widget child, {void onProgress(int current, int total)?}) Future<bool>
Merge imported places into encrypted storage.
resetSessionState() Future<void>
Reset session state (call on logout).
updateEncryptedPlace(Place updatedPlace, BuildContext context, Widget child) Future<bool>
Update an encrypted place. Ensures security key is available before modifying encrypted data.
writeEncryptedPlaces(List<Place> places, BuildContext context, Widget child) Future<bool>
Write encrypted places to Pod. Optimized: Uses persistent directoryVerified flag to skip repeated directory status checks across app sessions.