Encrypted messaging app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
856 B

  1. import 'package:Envelope/components/custom_title_bar.dart';
  2. import 'package:Envelope/models/image_message.dart';
  3. import 'package:flutter/material.dart';
  4. class ViewImage extends StatelessWidget {
  5. const ViewImage({
  6. Key? key,
  7. required this.message,
  8. }) : super(key: key);
  9. final ImageMessage message;
  10. @override
  11. Widget build(BuildContext context) {
  12. return Scaffold(
  13. backgroundColor: Colors.black,
  14. appBar: const CustomTitleBar(
  15. title: Text(''),
  16. showBack: true,
  17. backgroundColor: Colors.black,
  18. forgroundColor: Colors.white,
  19. iconColor: Colors.white,
  20. ),
  21. body: Center(
  22. child: InteractiveViewer(
  23. panEnabled: false,
  24. minScale: 1,
  25. maxScale: 4,
  26. child: Image.file(
  27. message.file,
  28. ),
  29. )
  30. ),
  31. );
  32. }
  33. }