Solian/lib/widgets/attachments/attachment_list_fullscreen.dart

49 lines
1.3 KiB
Dart
Raw Normal View History

2024-05-20 16:02:39 +00:00
import 'package:flutter/material.dart';
import 'package:solian/models/attachment.dart';
2024-05-22 15:18:01 +00:00
import 'package:solian/widgets/attachments/attachment_item.dart';
2024-05-20 16:02:39 +00:00
class AttachmentListFullscreen extends StatefulWidget {
final Attachment attachment;
const AttachmentListFullscreen({super.key, required this.attachment});
@override
State<AttachmentListFullscreen> createState() =>
_AttachmentListFullscreenState();
2024-05-20 16:02:39 +00:00
}
class _AttachmentListFullscreenState extends State<AttachmentListFullscreen> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Material(
color: Theme.of(context).colorScheme.surface,
2024-05-20 16:02:39 +00:00
child: GestureDetector(
child: SizedBox(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
child: InteractiveViewer(
boundaryMargin: const EdgeInsets.all(128),
minScale: 0.1,
maxScale: 16,
panEnabled: true,
scaleEnabled: true,
child: AttachmentItem(
showHideButton: false,
item: widget.attachment,
fit: BoxFit.contain,
),
),
),
onTap: () {
Navigator.pop(context);
},
),
);
}
}