switchPageTo function
Implementation
Future<void> switchPageTo(
BuildContext context,
Widget widget,
) async {
Navigator.pushReplacement(
context,
PageRouteBuilder(
pageBuilder: (context, animation1, animation2) => widget,
transitionDuration: Duration.zero,
reverseTransitionDuration: Duration.zero,
),
);
}