import 'package:flutter/material.dart';
|
|
|
|
import '/components/custom_title_bar.dart';
|
|
import '/database/models/image_message.dart';
|
|
|
|
class ViewImage extends StatelessWidget {
|
|
const ViewImage({
|
|
Key? key,
|
|
required this.message,
|
|
}) : super(key: key);
|
|
|
|
final ImageMessage message;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: Colors.black,
|
|
appBar: const CustomTitleBar(
|
|
title: Text(''),
|
|
showBack: true,
|
|
backgroundColor: Colors.black,
|
|
forgroundColor: Colors.white,
|
|
iconColor: Colors.white,
|
|
),
|
|
body: Center(
|
|
child: InteractiveViewer(
|
|
panEnabled: false,
|
|
minScale: 1,
|
|
maxScale: 4,
|
|
child: Image.file(
|
|
message.file,
|
|
),
|
|
)
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|