You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GetPage(
name: '/',
page: () => const RootView(),
bindings: [RootBinding()],
participatesInRootNavigator: true,
preventDuplicates: true,
children: [
// Splash Screen
GetPage<SplashScreen>(
name: _Paths.splashScreen,
transitionDuration: transitionDuration,
page: () => const SplashScreen(),
transition: Transition.native,
binding: SplashBindings(),
),
GetPage<AppScreen>(
name: _Paths.appScreen,
transitionDuration: transitionDuration,
page: () => const AppScreen(),
transition: Transition.native,
preventDuplicates: true,
binding: AppBindings(),
children: [
// Home Screen
GetPage(
name: _Paths.homeScreen,
page: () => const HomeScreen(),
binding: HomeBindings(),
transition: Transition.noTransition,
),
... some other pages with bottom navigation should be persistent
]),
// Channel Detail Screen (there shouldn't be bottom navigation bar - so I've placed it under the root)
GetPage(
name: "/:channelID"
page: () => const ChannelDetailScreen(),
transition: Transition.native,
binding: ChannelDetailBindings(),
participatesInRootNavigator: true,
),
])
My app is working as expected but when I want to go from channel list (which is in the bottom bar) to channel detail with below code;
Get.toNamed<void>(/:channelID);
it's going to the page but it's also calling the "initialRoute" of the app screen as you can see in the logs;
flutter: [GetRouter] GOING TO ROUTE /channel-detail-screen
flutter: (GetPage<dynamic>("/channel-detail-screen", [<'/channel-detail-screen?channelID=c8ea0960-ee5f-4a03-9855-b6cc81f73b0a'>], /channel-detail-screen?channelID=c8ea0960-ee5f-4a03-9855-b6cc81f73b0a))
flutter: [GetRouter] Instance "HomeController" has been created
flutter: [GetRouter] Instance "HomeController" has been initialized
and strange thing is, after the page is created, it's deleting and re-creating the page again
flutter: [GetRouter] "HomeController" onDelete() called
flutter: [GetRouter] "HomeController" deleted from memory
flutter: [GetRouter] Instance "HomeController" already removed.
flutter: [GetRouter] "AppController" onDelete() called
flutter: [GetRouter] "AppController" deleted from memory
and my app screen is completely same as "homescren" in the example.
how can I resolve this issue
Update 1: I've figured out, I cannot go to any link under root but just app. So when I want to go "signin path" (which is under root) it's not going there.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I've completely applied the nav example for get 5 but there is a problem.
I've defined my routing as;
My app is working as expected but when I want to go from channel list (which is in the bottom bar) to channel detail with below code;
it's going to the page but it's also calling the "initialRoute" of the app screen as you can see in the logs;
and strange thing is, after the page is created, it's deleting and re-creating the page again
my root:
and my app screen is completely same as "homescren" in the example.
how can I resolve this issue
Update 1: I've figured out, I cannot go to any link under root but just app. So when I want to go "signin path" (which is under root) it's not going there.
Beta Was this translation helpful? Give feedback.
All reactions