postSaveNav function
Implementation
Future<void> postSaveNav(
BuildContext context,
SolidFunctionCallStatus createNoteStatus,
Widget returnPage,
) async {
if (createNoteStatus == SolidFunctionCallStatus.success) {
//Navigator.pop(context);
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (context) => AppHomePage(
title: topBarTitle,
childPage: returnPage,
),
),
(Route<dynamic> route) =>
false, // This predicate ensures all previous routes are removed
);
} else {
Navigator.pop(context);
showErrDialog(
context,
'Failed to store the note file in your POD. Try again!',
);
}
}