A form draft is customer work, not merely widget state. Decide what should survive navigation, process termination, session expiry, and account switching before adding autosave.
The important promise is not that text appears on the screen. It is that the app can recover the right draft for the right person without submitting it accidentally or exposing it to another account.
Define the draft lifecycle
Identify the draft owner, related resource, schema version, last durable save, and submission state. Distinguish saved locally, saved remotely, queued for submission, and accepted by the server.
Choose storage based on the workflow's durability and privacy requirements. Flutter's persistence cookbook provides starting options, but a package choice does not determine the product's account-separation or recovery rules.
Recover a fictional inspection form
Suppose an inspector writes notes and attaches three photos while offline. The app saves the draft locally and reports that state clearly. The inspector closes the app before submitting.
On return, verify the notes, attachment references, intended customer, and current user. Test process termination during save, missing photo storage, low disk space, an app upgrade, and a different signed-in account. The draft should not silently migrate to the new account or disappear because an unrelated cache was cleared.
When submitting, preserve the draft until the application establishes the agreed successful outcome. If confirmation is lost after server acceptance, resolve the existing operation before creating another submission.
Make navigation and restoration deliberate
Warn about genuinely unsaved work where needed, while avoiding prompts after every harmless screen change. Show the last confirmed save state so users can make an informed choice.
If the server record changed while the draft was open, treat restoration as a possible conflict. Compare the draft's base revision with current data and apply the chosen merge or review policy. Autosave should not become a quiet overwrite mechanism.
The tradeoff is recovery convenience versus retained private data and implementation complexity. Frequent persistence can reduce loss but requires performance, cleanup, and lifecycle review. A small pilot may use an explicit save-draft action if its limitations are clear and acceptable.
The Social App case study provides related mobile and offline context. This inspection draft is fictional and does not describe a tested implementation there.
Questions about unsent Flutter forms
Should signing out delete every draft?
That depends on the policy and data sensitivity. Keep account separation clear and explain any destructive consequence before it occurs.
Does autosave mean the form was submitted?
No. Local or remote draft persistence is distinct from acceptance of the final business operation. Label those states separately.
What should be tested first?
Terminate the app after editing but before submission, then sign in as another account. Inspect recovery and privacy behaviour in a Flutter form review.