todo-app/lib/ui/images/image_viewer_screen.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

25 lines
655 B
Dart

import 'package:flutter/material.dart';
import 'package:todo/attachments/image_store_api.dart';
import 'package:todo/ui/images/image_embed.dart';
/// One image, full screen, pinch/scroll to zoom.
class ImageViewerScreen extends StatelessWidget {
/// Creates the viewer for [source].
const ImageViewerScreen({required this.source, super.key});
/// Where the image is drawn from.
final ImageSource source;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: InteractiveViewer(
maxScale: 8,
child: Center(child: imageFor(source, fit: BoxFit.contain)),
),
);
}
}