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? border,
double? borderRadius, double? borderRadius,
}) { }) {
final iconH = height ?? 24.h; final double? iconW = (width == null && height == null) ? 24.w : width;
final iconW = width ?? 24.w; final double? iconH = (width == null && height == null) ? 24.h : height;
return PreserveImageColors( return PreserveImageColors(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(

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

@ -13,17 +13,27 @@ class FullScreenImageViewer extends StatelessWidget {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
backgroundColor: Colors.black, backgroundColor: Colors.black,
elevation: 0,
leading: IconButton( leading: IconButton(
icon: Icon(Icons.close, color: AppColors.whiteColor), icon: Icon(Icons.close, color: AppColors.whiteColor),
onPressed: () => Navigator.of(context).pop(), onPressed: () => Navigator.of(context).pop(),
), ),
), ),
backgroundColor: Colors.black, backgroundColor: Colors.black,
body: Center( body: SizedBox.expand(
child: InteractiveViewer( child: InteractiveViewer(
child: isSvg minScale: 0.5,
? Utils.buildSvgWithAssets(icon: path, width: double.infinity, fit: BoxFit.contain, applyThemeColor: false) maxScale: 6.0,
: Utils.buildImgWithAssets(icon: path, width: double.infinity, fit: BoxFit.contain), 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