import 'dart:io';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class SingleImageDialog extends StatelessWidget {
final String path;
const SingleImageDialog({super.key, required this.path});
@override
Widget build(BuildContext context) {
return Dismissible(
key: const Key('key'),
onDismissed: (_) => Get.back(),
direction: DismissDirection.vertical,
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: path.contains('http') ? NetworkImage(path) : FileImage(File(path)) as ImageProvider,
fit: BoxFit.fitWidth,
),
),
),
);
}
}