flutter_form_draft 0.2.0
flutter_form_draft: ^0.2.0 copied to clipboard
Automatic form draft saving, encrypted persistence, restoration, versioning, expiration, and lifecycle recovery for Flutter applications.
0.2.0 - 2026-08-09 #
Added #
FileDraftStoragewith caller-provided directories, atomic writes, optional gzip compression, corruption reporting, and package-scoped cleanup- Pluggable
DraftCipher,NoOpDraftCipher, and authenticated AES-256-GCM encryption throughAesDraftCipher - Lifecycle saving through
DraftLifecycleObserverandAppLifecycleSavePolicy - Real interval-based behavior for
DraftSaveMode.periodic - Searchable and filterable
DraftManagementScreenwith restore hooks, rename, duplicate, delete, and expired-draft cleanup - Metadata update and draft duplication APIs on
DraftManager - Enum, map, custom-model, and file-reference field adapters
- Nested mutable-value snapshots for list and map dirty-state detection
- Examples and tests for encryption, lifecycle saves, file storage, advanced fields, and draft management
Changed #
- Encrypted drafts keep form payloads and checksums inside the authenticated ciphertext while leaving explicitly supplied list metadata visible
- The Basic Contact Form example now uses
SharedPreferencesDraftStorage, allowing automatic restoration after route recreation and app restarts - The README now explains storage lifetime, manager ownership, stable draft identities, debounced navigation saves, and the exact behavior of every restore mode
- Repeated form saves preserve existing draft-list metadata unless replacement metadata is explicitly supplied
- Metadata listing now preserves original, unsanitized draft identities
- Package version is now
0.2.0
Fixed #
- Queued changes made during an in-flight save are persisted instead of being incorrectly marked clean by the older save
hasPendingSavenow includes scheduled debounced saves- Guest-to-user transfer no longer transfers drafts already owned by another user
- Restore-ready callbacks no longer run after
FormDrafthas been disposed - Corrupt metadata entries are skipped safely during draft listing and emit typed error events
0.1.0 #
Initial release.
Added #
- Core
DraftManagerwith save, read, delete, list, and cleanup APIs DraftIdentity,DraftRecord,DraftMetadata, and result typesMemoryDraftStorageandSharedPreferencesDraftStorage- Generic
DraftSerializerwithMapDraftSerializer DraftController,ValueDraftController, andFormDraftController- Field adapters for text controllers and value notifiers
FormDraftwidget with debounced auto-save and restore workflowsDraftRestoreDialog,DraftAutosaveIndicator,DraftStatusBuilder, andDraftPopScope- Draft expiration, multiple drafts, and user isolation
- Schema migration registry with chained migrations
- Conflict handling extension points
- Unit and widget tests
- Example application with basic, registration, and multiple-draft demos
Notes #
- Encryption, file storage, and lifecycle auto-save are planned for 0.2.0