From 0aac9e0dc76692701f5aae1da2326d58f9b7a2d4 Mon Sep 17 00:00:00 2001 From: ashrafzarkanisala Date: Mon, 29 Jul 2024 01:03:57 +0300 Subject: [PATCH] push save bottom on teh bottom sheets --- .../effective_period_bottom_sheet.dart | 29 ++++++++++++--- .../smart_automation_list.dart | 36 ++++++++++++++----- .../smart_tab_run_list.dart | 36 ++++++++++++++----- 3 files changed, 81 insertions(+), 20 deletions(-) diff --git a/lib/features/scene/widgets/effective_period_setting/effective_period_bottom_sheet.dart b/lib/features/scene/widgets/effective_period_setting/effective_period_bottom_sheet.dart index 66d7164..659f163 100644 --- a/lib/features/scene/widgets/effective_period_setting/effective_period_bottom_sheet.dart +++ b/lib/features/scene/widgets/effective_period_setting/effective_period_bottom_sheet.dart @@ -2,6 +2,8 @@ import 'package:flutter/material.dart'; import 'package:syncrow_app/features/scene/widgets/effective_period_setting/period_options.dart'; import 'package:syncrow_app/features/scene/widgets/effective_period_setting/repeat_days.dart'; import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart'; +import 'package:syncrow_app/utils/context_extension.dart'; import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; import 'package:syncrow_app/utils/resource_manager/font_manager.dart'; @@ -17,10 +19,29 @@ class EffectPeriodBottomSheetContent extends StatelessWidget { child: Column( mainAxisSize: MainAxisSize.min, children: [ - BodyMedium( - text: 'Effective Period', - fontColor: ColorsManager.primaryColorWithOpacity, - fontWeight: FontsManager.bold, + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: TextButton( + onPressed: () => Navigator.pop(context), + child: BodySmall( + text: 'Save', + style: context.bodySmall.copyWith( + color: ColorsManager.primaryColorWithOpacity), + )), + ), + Expanded( + flex: 2, + child: BodyMedium( + text: 'Effective Period', + fontColor: ColorsManager.primaryColorWithOpacity, + fontWeight: FontsManager.bold, + textAlign: TextAlign.center, + ), + ), + const Spacer(), + ], ), const Divider( color: ColorsManager.backgroundColor, diff --git a/lib/features/scene/widgets/select_smart_scene/smart_automation_list.dart b/lib/features/scene/widgets/select_smart_scene/smart_automation_list.dart index 962645f..e987f4a 100644 --- a/lib/features/scene/widgets/select_smart_scene/smart_automation_list.dart +++ b/lib/features/scene/widgets/select_smart_scene/smart_automation_list.dart @@ -7,6 +7,7 @@ import 'package:syncrow_app/features/scene/model/scenes_model.dart'; import 'package:syncrow_app/features/scene/model/smart_scene_enable.dart'; import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart'; import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart'; import 'package:syncrow_app/generated/assets.dart'; import 'package:syncrow_app/utils/context_extension.dart'; import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; @@ -53,14 +54,33 @@ class _SmartSceneSelectAutomationListState return Column( mainAxisSize: MainAxisSize.min, children: [ - Padding( - padding: const EdgeInsets.symmetric(vertical: 8.0), - child: BodyMedium( - text: 'Automation', - style: context.bodyMedium.copyWith( - color: ColorsManager.primaryColorWithOpacity, - fontWeight: FontWeight.bold), - ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: TextButton( + onPressed: () => Navigator.pop(context), + child: BodySmall( + text: 'Save', + style: context.bodySmall + .copyWith(color: ColorsManager.primaryColorWithOpacity), + )), + ), + Expanded( + flex: 2, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: BodyMedium( + text: 'Automation', + textAlign: TextAlign.center, + style: context.bodyMedium.copyWith( + color: ColorsManager.primaryColorWithOpacity, + fontWeight: FontWeight.bold), + ), + ), + ), + const Spacer(), + ], ), const Divider( color: ColorsManager.dividerColor, diff --git a/lib/features/scene/widgets/select_smart_scene/smart_tab_run_list.dart b/lib/features/scene/widgets/select_smart_scene/smart_tab_run_list.dart index 6fbae23..15fc2b6 100644 --- a/lib/features/scene/widgets/select_smart_scene/smart_tab_run_list.dart +++ b/lib/features/scene/widgets/select_smart_scene/smart_tab_run_list.dart @@ -5,6 +5,7 @@ import 'package:syncrow_app/features/scene/model/scenes_model.dart'; import 'package:syncrow_app/features/scene/model/smart_scene_enable.dart'; import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart'; import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart'; +import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart'; import 'package:syncrow_app/generated/assets.dart'; import 'package:syncrow_app/utils/context_extension.dart'; import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; @@ -29,14 +30,33 @@ class _SmartSceneSelectTabToRunListState return Column( mainAxisSize: MainAxisSize.min, children: [ - Padding( - padding: const EdgeInsets.symmetric(vertical: 8.0), - child: BodyMedium( - text: 'Tab To Run', - style: context.bodyMedium.copyWith( - color: ColorsManager.primaryColorWithOpacity, - fontWeight: FontWeight.bold), - ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: TextButton( + onPressed: () => Navigator.pop(context), + child: BodySmall( + text: 'Save', + style: context.bodySmall + .copyWith(color: ColorsManager.primaryColorWithOpacity), + )), + ), + Expanded( + flex: 2, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: BodyMedium( + text: 'Tab To Run', + textAlign: TextAlign.center, + style: context.bodyMedium.copyWith( + color: ColorsManager.primaryColorWithOpacity, + fontWeight: FontWeight.bold), + ), + ), + ), + const Spacer(), + ], ), const Divider( color: ColorsManager.dividerColor,