0

Let's say I have 4 files in my project.

navbar, firstPage, secondPage, thirdPage.

In the navbar I have a side drawer with navigation for the pageview and a pageview for firstPage secondPage and thirdPage.

How do I access navbar PageController.jumpToPage() from button onTab function in other pages?

Cem Kaan
  • 2,086
  • 1
  • 24
  • 55

1 Answers1

0

You can access navbar PageController.jumpToPage() from button onTab function in other pages by 2 ways:

1 passing PageController to the page that have onTab function

2 using dependence injection that can share PageController with any page, have a look at get_it package for more info.

Mohamed Reda
  • 1,207
  • 13
  • 21