I want to know if it is possible to push my initial route screen before accessing another screen. It is my first time using flutter web and GetX and I don't know if it's intended behavior or not.
As for now, when I try to access TransactionDetailPage directly from the URL by typing http://localhost:64289/transaction/1, it doesn't push my MainHomePage screen. There's no back button in TransactionDetailPage AppBar when I access it this way.
What I want to do is to push MainHomePage on the first stack of the screen whenever the user tries to access some other page directly from URL, so there's always a back button to pop the current screen to my home page. How can I achieve this?
main.dart
Widget build(BuildContext context) {
return GetMaterialApp(
title: 'Flutter test',
debugShowCheckedModeBanner: false,
initialRoute: '/',
getPages: [
GetPage(
name: '/',
page: () => MainHomePage(),
),
GetPage(
name: '/transaction/:id',
page: () => TransactionDetailPage(),
),
],
);
}