CMC image view issue.

pull/370/head
Sultan khan 3 weeks ago
parent 81a07e4d3f
commit 73bc66f9c9

@ -808,8 +808,8 @@ class Utils {
double? border,
double? borderRadius,
}) {
final iconH = height ?? 24.h;
final iconW = width ?? 24.w;
final double? iconW = (width == null && height == null) ? 24.w : width;
final double? iconH = (width == null && height == null) ? 24.h : height;
return PreserveImageColors(
child: Container(
decoration: BoxDecoration(

@ -282,19 +282,22 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
final String imagePath = appStateLocal.isArabic() ? AppAssets.comprehensiveCheckupAr : AppAssets.comprehensiveCheckupEn;
return Stack(
children: [
Utils.buildImgWithAssets(
icon: imagePath,
width: double.infinity,
fit: BoxFit.cover,
ClipRRect(
borderRadius: BorderRadius.circular(16.r),
child: Utils.buildImgWithAssets(
icon: imagePath,
width: double.infinity,
fit: BoxFit.fitWidth,
),
).paddingAll(16.w),
Align(
alignment: Alignment.topRight,
child: Container(
decoration: BoxDecoration(
color: Color.fromARGB(51, 0, 0, 0),
color: Color.fromARGB(120, 0, 0, 0),
borderRadius: BorderRadius.circular(1000.r),
),
margin: EdgeInsets.all(16.h),
margin: EdgeInsets.all(24.w),
child: IconButton(
icon: Icon(
Icons.zoom_in,

@ -13,17 +13,27 @@ class FullScreenImageViewer extends StatelessWidget {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.black,
elevation: 0,
leading: IconButton(
icon: Icon(Icons.close, color: AppColors.whiteColor),
onPressed: () => Navigator.of(context).pop(),
),
),
backgroundColor: Colors.black,
body: Center(
body: SizedBox.expand(
child: InteractiveViewer(
child: isSvg
? Utils.buildSvgWithAssets(icon: path, width: double.infinity, fit: BoxFit.contain, applyThemeColor: false)
: Utils.buildImgWithAssets(icon: path, width: double.infinity, fit: BoxFit.contain),
minScale: 0.5,
maxScale: 6.0,
boundaryMargin: const EdgeInsets.all(20),
child: Center(
child: isSvg
? Utils.buildSvgWithAssets(icon: path, fit: BoxFit.contain, applyThemeColor: false)
: Image.asset(
path,
fit: BoxFit.contain,
errorBuilder: (context, error, stackTrace) => Utils.buildImgWithAssets(icon: path, fit: BoxFit.contain),
),
),
),
),
);

Loading…
Cancel
Save