feat(import): implement recipe import functionality with file and URL support
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/// Result from `POST /api/quick-import`.
|
||||
class QuickImportResult {
|
||||
final String markdown;
|
||||
final String source; // 'ica' | 'pdf' | 'image' | 'other'
|
||||
final String? imageUrl;
|
||||
|
||||
const QuickImportResult({
|
||||
required this.markdown,
|
||||
required this.source,
|
||||
this.imageUrl,
|
||||
});
|
||||
|
||||
factory QuickImportResult.fromJson(Map<String, dynamic> json) =>
|
||||
QuickImportResult(
|
||||
markdown: json['markdown'] as String? ?? '',
|
||||
source: json['source'] as String? ?? 'other',
|
||||
imageUrl: json['imageUrl'] as String?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user