You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mohemm-flutter-app/lib/ui/chat/chat_full_image_preview.dart

41 lines
1.1 KiB
Dart

import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
class ChatImagePreviewScreen extends StatelessWidget {
const ChatImagePreviewScreen({Key? key, required this.imgTitle, required this.img}) : super(key: key);
final String imgTitle;
final Uint8List img;
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () {
Navigator.of(context).pop();
},
child: Dialog(
backgroundColor: Colors.transparent,
insetPadding: const EdgeInsets.all(10),
child: Stack(
alignment: Alignment.center,
children: [
Image.memory(
img,
fit: BoxFit.cover,
).paddingAll(10),
const Positioned(
right: 0,
top: 0,
child: Icon(Icons.cancel, color: MyColors.redA3Color, size: 35),
)
],
),
),
);
}
}