Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions lib/app/modules/home/views/home_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ class HomeView extends GetView<HomeController> {
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
var width = Get.width;
var height = Get.height;

// Homeview resetted to expanded state whenever HomeView is rebuilt.
controller.scalingFactor.value = 1.0;

return Scaffold(
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
floatingActionButton: Obx(
Expand Down Expand Up @@ -68,7 +72,8 @@ class HomeView extends GetView<HomeController> {
actions: [Container()],
automaticallyImplyLeading: false,
expandedHeight: height / 7.9,
floating: true,
collapsedHeight: height / 7.9,
floating: false,
pinned: true,
snap: false,
centerTitle: true,
Expand Down Expand Up @@ -249,7 +254,8 @@ class HomeView extends GetView<HomeController> {
automaticallyImplyLeading: false,
actions: [Container()],
expandedHeight: height / 7.9,
floating: true,
collapsedHeight: height / 7.9,
floating: false,
pinned: true,
snap: false,
centerTitle: true,
Expand Down Expand Up @@ -554,8 +560,8 @@ class HomeView extends GetView<HomeController> {
return alarm.profile ==
controller.selectedProfile.value
? Dismissible(
onDismissed: (direction) async {
// pop up confirmation to delete on swipe
confirmDismiss: (direction) async {
// Show confirmation dialog BEFORE removing the item
bool userConfirmed =
await showDeleteAlarmConfirmationPopupOnSwipe(
context,
Expand All @@ -566,13 +572,8 @@ class HomeView extends GetView<HomeController> {
alarm,
);
}

Get.offNamedUntil(
'/bottom-navigation-bar',
(route) =>
route.settings.name ==
'/splash-screen',
);
// Returning true if delete is confirmed, false otherwise
return userConfirmed;
},
key: ValueKey(alarms[index]),
background: Container(
Expand Down