Files
sharedinbox/lib/core/models/draft.dart
T
Thomas GüttlerandClaude Sonnet 4.6 e1e95e97ee feat: draft auto-save in compose screen
- Add Drafts table (schema v4 migration) with autoincrement id,
  accountId, replyToEmailId, to/cc/subject/body text, updatedAt
- DraftRepository interface + DraftRepositoryImpl (Drift)
- draftRepositoryProvider wired in di.dart
- ComposeScreen debounces saves (2 s after last keystroke), shows
  transient "Saved" indicator, restores the latest matching draft on
  open when no prefill fields are provided, deletes draft on send
- 6 new unit tests for DraftRepositoryImpl
- New widget test verifying draft restore behaviour
- FakeDraftRepository added to widget test helpers
- draft_repository.dart added to coverage no-code exclusion list

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 19:06:02 +02:00

22 lines
458 B
Dart

class SavedDraft {
final int id;
final String? accountId;
final String? replyToEmailId;
final String toText;
final String ccText;
final String subjectText;
final String bodyText;
final DateTime updatedAt;
const SavedDraft({
required this.id,
this.accountId,
this.replyToEmailId,
required this.toText,
required this.ccText,
required this.subjectText,
required this.bodyText,
required this.updatedAt,
});
}