Skip to content

Commit e0d31fd

Browse files
feat: add snackbar message for task update
1 parent df4ad07 commit e0d31fd

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

lib/app/modules/detailRoute/views/detail_route_view.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,26 @@ class DetailRouteView extends GetView<DetailRouteController> {
115115
// Cancel → stay
116116
return false;
117117
}
118+
if (save == true) {
119+
controller.saveChanges();
120+
controller.onEdit.value = false;
121+
WidgetsBinding.instance.addPostFrameCallback((_) {
122+
ScaffoldMessenger.of(context).showSnackBar(
123+
SnackBar(
124+
backgroundColor: tColors.secondaryBackgroundColor,
125+
content: Text(
126+
SentenceManager(
127+
currentLanguage: AppSettings.selectedLanguage,
128+
).sentences
129+
.taskUpdated,
130+
style: TextStyle(
131+
color: tColors.primaryTextColor,
132+
),
133+
),
134+
),
135+
);
136+
});
137+
}
118138
// Yes (true) or No (false) → both allow popping the screen
119139
return true;
120140
},

0 commit comments

Comments
 (0)