-
Notifications
You must be signed in to change notification settings - Fork 640
Description
Duplicate Check
- I have searched the opened issues and there are no duplicates
Describe the bug
I have a very simple root logic to control the content on my screen.
I have my root page and I navigate between pages using the push_route coroutine. However despite setting a navigation bar for my page, it does not appear on the screen. The only way I can get it to display is to manually assign it to each view. This is not ideal however as it is not code efficient and also causes the navigation bar to animate with the changing views.
I am not entirely sure why this is happening since I used the navigation bar property in the past with a container added to the page which would have its content swapped out to navigate between pages, but when switching over to using the Views in Flet, the issue arises.
Code sample
Code
import flet as ft
class Basic(ft.View):
def __init__(self):
super().__init__()
self.route = '/basic'
self.content = ft.Text('HELLO')
def main(page: ft.Page):
async def change_page():
await page.push_route('/basic')
change_page()
page.navigation_bar = ft.NavigationBar()
ft.app(main)To reproduce
- Run
- nav bar not visible
- cry
Expected behavior
Navigation bar should overlay views
Screenshots / Videos
Captures
[Upload media here]
Operating System
Windows
Operating system details
Windows 10
Flet version
0.82.2
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
Logs
[Paste your logs here]Additional details
No response