From cf20bdcd4289fa28d439ba566ff39cbe5c27a507 Mon Sep 17 00:00:00 2001 From: Faris Armoush Date: Mon, 21 Apr 2025 10:57:46 +0300 Subject: [PATCH] SP-1440 --- .../routines/helper/save_routine_helper.dart | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/lib/pages/routines/helper/save_routine_helper.dart b/lib/pages/routines/helper/save_routine_helper.dart index c568c6c1..bc4764e3 100644 --- a/lib/pages/routines/helper/save_routine_helper.dart +++ b/lib/pages/routines/helper/save_routine_helper.dart @@ -14,7 +14,7 @@ class SaveRoutineHelper { static Future showSaveRoutineDialog(BuildContext context) async { return showDialog( context: context, - builder: (BuildContext context) { + builder: (context) { return BlocBuilder( builder: (context, state) { final selectedConditionLabel = state.selectedAutomationOperator == 'and' @@ -24,7 +24,8 @@ class SaveRoutineHelper { return AlertDialog( contentPadding: EdgeInsets.zero, content: Container( - width: MediaQuery.sizeOf(context).width * 0.5, + width: context.screenWidth * 0.5, + height: 500, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(20), @@ -44,17 +45,24 @@ class SaveRoutineHelper { const SizedBox(height: 18), _buildDivider(), _buildListsLabelRow(selectedConditionLabel), - Padding( - padding: const EdgeInsetsDirectional.symmetric( - horizontal: 16, - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - _buildIfConditions(state, context), - _buildThenActions(state, context), - ], + Expanded( + child: Padding( + padding: const EdgeInsetsDirectional.symmetric( + horizontal: 16, + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + spacing: 24, + children: [ + _buildIfConditions(state, context), + Container( + width: 1, + color: ColorsManager.greyColor, + ), + _buildThenActions(state, context), + ], + ), ), ), _buildDivider(), @@ -133,7 +141,7 @@ class SaveRoutineHelper { static Widget _buildThenActions(RoutineState state, BuildContext context) { return Expanded( child: ListView( - shrinkWrap: true, + // shrinkWrap: true, children: state.thenItems.map((item) { final functions = state.selectedFunctions[item['uniqueCustomId']] ?? []; return functionRow(item, context, functions); @@ -145,7 +153,7 @@ class SaveRoutineHelper { static Widget _buildIfConditions(RoutineState state, BuildContext context) { return Expanded( child: ListView( - shrinkWrap: true, + // shrinkWrap: true, children: [ if (state.isTabToRun) ListTile(