navigateToReturn function
Implementation
Future navigateToReturn(BuildContext context, Widget widget) async {
final leData = await Navigator.of(context).push(
PageRouteBuilder(
pageBuilder: (context, animation, secondaryAnimation) => widget,
transitionDuration: Duration.zero,
reverseTransitionDuration: Duration.zero,
),
);
return leData;
}