todo-app/lib/sync/backlog_export_web.dart
Krzysztof kuhy Rudnicki 0798f7b1d0 Attach images to notes, stored on dufs and kept offline
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-25 14:11:15 +02:00

12 lines
565 B
Dart

import 'package:todo/data/desktop_backup_client.dart';
import 'package:todo/sync/desktop_wrapper.dart';
/// Writes the Markdown export through the desktop wrapper, so an explicit
/// Export still lands at the canonical `~/src/todo/BACKLOG.md` path the user's
/// tooling reads — the browser itself cannot write there.
Future<String> exportBacklog(String markdown, int noteCount) async {
final client = DesktopBackupClient(baseUrl: servingWrapperOrigin());
await client.writeBacklog(markdown);
return 'Exported $noteCount notes to ~/src/todo/BACKLOG.md';
}