From 294aa3a4ff532f605304a500ca6c5f832b15e5e9 Mon Sep 17 00:00:00 2001 From: Abhay Chaudhary Date: Mon, 21 Mar 2022 11:31:42 +0530 Subject: [PATCH 1/2] Bug:UI fixed and made it dynamic according to the device width. --- .../dialogs/smooth_alert_dialog.dart | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart b/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart index 15254b749bf..a0d82d8d5b8 100644 --- a/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart +++ b/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart @@ -35,12 +35,14 @@ class SmoothAlertDialog extends StatelessWidget { shape: const RoundedRectangleBorder( borderRadius: ROUNDED_BORDER_RADIUS, ), - content: Column( - mainAxisSize: MainAxisSize.min, - children: [ - _buildTitle(context), - SizedBox(height: height, child: body), - ], + content: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + _buildTitle(context), + SizedBox(height: height, child: body), + ], + ), ), actions: actions == null ? null @@ -66,21 +68,23 @@ class SmoothAlertDialog extends StatelessWidget { } else { return Column( children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - _buildCross(true, context), - if (title != null) - SizedBox( - height: height, - child: Text( - title!, - style: Theme.of(context).textTheme.headline2, + FittedBox( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + _buildCross(true, context), + if (title != null) + SizedBox( + height: height, + child: Text( + title!, + style: Theme.of(context).textTheme.headline2, + ), ), - ), - _buildCross(false, context), - ], + _buildCross(false, context), + ], + ), ), Divider( color: Theme.of(context).colorScheme.onBackground, From 61a1bf8fe6a704acc1aea7bba2809fdba69ee57c Mon Sep 17 00:00:00 2001 From: Abhay Chaudhary Date: Mon, 21 Mar 2022 11:46:11 +0530 Subject: [PATCH 2/2] Bug:UI fixed and made it dynamic according to the device width. --- .../generic_lib/dialogs/smooth_alert_dialog.dart | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart b/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart index a0d82d8d5b8..3ed513719e7 100644 --- a/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart +++ b/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart @@ -35,14 +35,12 @@ class SmoothAlertDialog extends StatelessWidget { shape: const RoundedRectangleBorder( borderRadius: ROUNDED_BORDER_RADIUS, ), - content: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - _buildTitle(context), - SizedBox(height: height, child: body), - ], - ), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + _buildTitle(context), + SizedBox(height: height, child: body), + ], ), actions: actions == null ? null