Is it possible to navigate to another widget/page within a tab?

57 views
Skip to first unread message

Tililweet

unread,
Jun 13, 2020, 11:26:44 AM6/13/20
to Flutter Development (flutter-dev)

flutter pics.png

For some reason sniping didn't work like it should anyway, in the picture above I have 3 tabs. It's currently on the groups tab. When the button is pressed , it should create another widget within that container. When I tried to navigate to the other widget I noticed that it went full screen. So is there a way to navigate to another widget/page within the tab? 


Vikram S Sangotra

unread,
Jun 13, 2020, 11:49:06 AM6/13/20
to Flutter Development (flutter-dev)
You'll have to try WillPopeScope - I have posted query today morning. Wait for the replies....

Jeff Jorczak

unread,
Jun 14, 2020, 9:00:53 PM6/14/20
to Flutter Development (flutter-dev)
What I have done to achieve this is to make a "Layout" or "Master" page widget, that contains all the app chrome, but takes a child what lands in the content area of your page. So any page you want to look like this, wrap with your widget. Looks something like this:

Widget build(BuildContext context) {
return Layout(
child: Placeholde(
name: "Content",
),
);
}

Tililweet

unread,
Jun 19, 2020, 8:57:35 PM6/19/20
to Flutter Development (flutter-dev)
Hey I just saw your comment, can you explain this? Layout isnt a widget?

Vikram S Sangotra

unread,
Jun 19, 2020, 10:13:13 PM6/19/20
to Tililweet, Flutter Development (flutter-dev)

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/88f3f58e-0a25-4459-bb10-55519d764663o%40googlegroups.com.


--
Regards,
Vikram S Sangotra
Trivia Info IT

+91 97235 60260 | trivia.co.in


Jeff Jorczak

unread,
Jun 22, 2020, 10:17:55 AM6/22/20
to Flutter Development (flutter-dev)
`Layout` is a custom widget that has a header, footer, sidebar, etc, and one child that displays the content of the page. You build that to make each page have consistent "chrome". However, realizing you are asking about tabs specifically, there is a recipe for that that works a different way:


This is a well-established pattern using TabController.

My solution is more for the web where there are no tabs.

Reply all
Reply to author
Forward
0 new messages