flutter_form_draft 0.2.0 copy "flutter_form_draft: ^0.2.0" to clipboard
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 #

  • FileDraftStorage with caller-provided directories, atomic writes, optional gzip compression, corruption reporting, and package-scoped cleanup
  • Pluggable DraftCipher, NoOpDraftCipher, and authenticated AES-256-GCM encryption through AesDraftCipher
  • Lifecycle saving through DraftLifecycleObserver and AppLifecycleSavePolicy
  • Real interval-based behavior for DraftSaveMode.periodic
  • Searchable and filterable DraftManagementScreen with 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
  • hasPendingSave now includes scheduled debounced saves
  • Guest-to-user transfer no longer transfers drafts already owned by another user
  • Restore-ready callbacks no longer run after FormDraft has been disposed
  • Corrupt metadata entries are skipped safely during draft listing and emit typed error events

0.1.0 #

Initial release.

Added #

  • Core DraftManager with save, read, delete, list, and cleanup APIs
  • DraftIdentity, DraftRecord, DraftMetadata, and result types
  • MemoryDraftStorage and SharedPreferencesDraftStorage
  • Generic DraftSerializer with MapDraftSerializer
  • DraftController, ValueDraftController, and FormDraftController
  • Field adapters for text controllers and value notifiers
  • FormDraft widget with debounced auto-save and restore workflows
  • DraftRestoreDialog, DraftAutosaveIndicator, DraftStatusBuilder, and DraftPopScope
  • 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
0
likes
160
points
32
downloads

Documentation

API reference

Publisher

verified publisheramirsaleemahmad.com

Weekly Downloads

Automatic form draft saving, encrypted persistence, restoration, versioning, expiration, and lifecycle recovery for Flutter applications.

Repository (GitHub)
View/report issues
Contributing

Topics

#form #autosave #draft #persistence #offline

License

MIT (license)

Dependencies

collection, crypto, cryptography, flutter, meta, path, shared_preferences

More

Packages that depend on flutter_form_draft