From 6608e047bc34cedb2bd70d88729b890c6d8cbaf8 Mon Sep 17 00:00:00 2001 From: Sachin Dapkara <92971894+superiorsd10@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:41:43 +0530 Subject: [PATCH] Feature: Added margin to snack bar on swipe to delete (#387) * feat(alarm): add margin to the get snackbar on swipe to delete * chore(home-controller): remove previous snack bar comments --- .../modules/home/controllers/home_controller.dart | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/app/modules/home/controllers/home_controller.dart b/lib/app/modules/home/controllers/home_controller.dart index 9b3c6f64..61c61de7 100644 --- a/lib/app/modules/home/controllers/home_controller.dart +++ b/lib/app/modules/home/controllers/home_controller.dart @@ -532,9 +532,15 @@ class HomeController extends GetxController { Get.closeAllSnackbars(); } - GetSnackBar snackbar = GetSnackBar( - message: 'Alarm deleted', + Get.snackbar( + 'Alarm deleted', + 'The alarm has been deleted.', duration: const Duration(seconds: 4), + snackPosition: SnackPosition.BOTTOM, + margin: const EdgeInsets.symmetric( + horizontal: 10, + vertical: 15, + ), mainButton: TextButton( onPressed: () async { if (alarm.isSharedAlarmEnabled == true) { @@ -546,10 +552,5 @@ class HomeController extends GetxController { child: const Text('Undo'), ), ); - - Get.showSnackbar( - snackbar, - ); } } -