diff --git a/lib/core/utils/utils.dart b/lib/core/utils/utils.dart index fc81663e..e5761203 100644 --- a/lib/core/utils/utils.dart +++ b/lib/core/utils/utils.dart @@ -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( diff --git a/lib/presentation/comprehensive_checkup/comprehensive_checkup_page.dart b/lib/presentation/comprehensive_checkup/comprehensive_checkup_page.dart index 7e7bc613..88199055 100644 --- a/lib/presentation/comprehensive_checkup/comprehensive_checkup_page.dart +++ b/lib/presentation/comprehensive_checkup/comprehensive_checkup_page.dart @@ -282,19 +282,22 @@ class _ComprehensiveCheckupPageState extends State { 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, diff --git a/lib/widgets/media_viewer/full_screen_image_viewer.dart b/lib/widgets/media_viewer/full_screen_image_viewer.dart index ae6d4802..ce766204 100644 --- a/lib/widgets/media_viewer/full_screen_image_viewer.dart +++ b/lib/widgets/media_viewer/full_screen_image_viewer.dart @@ -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), + ), + ), ), ), );