From 6c55a79d2d1e6a2aaa49896a96d3d875548636d9 Mon Sep 17 00:00:00 2001 From: Seyed Amir Hossein Mosavi Date: Tue, 5 Sep 2023 16:51:47 +0330 Subject: [PATCH] fixed a bug in alert display --- lib/utils/action_sheet.dart | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/utils/action_sheet.dart b/lib/utils/action_sheet.dart index 1c550dd..7fdaab2 100644 --- a/lib/utils/action_sheet.dart +++ b/lib/utils/action_sheet.dart @@ -194,17 +194,19 @@ class ActionSheetUtils { Row( mainAxisSize: MainAxisSize.min, children: [ - GestureDetector( - onTap: () => Navigator.of(context).pop(), - child: Icon( - data.titleIcon, - size: 20, - color: data.titleColor, + if (data.titleIcon != null) + GestureDetector( + onTap: () => Navigator.of(context).pop(), + child: Icon( + data.titleIcon, + size: 20, + color: data.titleColor, + ), + ), + if (data.titleIcon != null) + const SizedBox( + width: 8, ), - ), - const SizedBox( - width: 8, - ), Expanded( child: DidvanText( data.title!,