- 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>
22 lines
458 B
Dart
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,
|
|
});
|
|
}
|