Chat Fixes & Chat Media Preview Api Implementation / On Msg Received Image
parent
5430fd2d32
commit
3309541142
@ -0,0 +1,40 @@
|
|||||||
|
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),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue