Skip to content

Commit

Permalink
Feature: Added margin to snack bar on swipe to delete (#387)
Browse files Browse the repository at this point in the history
* feat(alarm): add margin to the get snackbar on swipe to delete

* chore(home-controller): remove previous snack bar comments
  • Loading branch information
superiorsd10 authored Jan 25, 2024
1 parent e68b720 commit 6608e04
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions lib/app/modules/home/controllers/home_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -546,10 +552,5 @@ class HomeController extends GetxController {
child: const Text('Undo'),
),
);

Get.showSnackbar(
snackbar,
);
}
}

0 comments on commit 6608e04

Please sign in to comment.