fix: change how snackbar is opened, per upstream changes
old way is now deprecated; new way works with latest flet as well as 0.19.0
This commit is contained in:
parent
f3ab4f859d
commit
8fe4c94005
|
@ -39,9 +39,10 @@ def get_pos_batch_handler(config):
|
|||
|
||||
|
||||
def show_snackbar(page, text, bgcolor='yellow'):
|
||||
page.snack_bar = ft.SnackBar(ft.Text(text, color='black',
|
||||
size=40,
|
||||
weight=ft.FontWeight.BOLD),
|
||||
bgcolor=bgcolor,
|
||||
duration=1500)
|
||||
page.snack_bar.open = True
|
||||
snack_bar = ft.SnackBar(ft.Text(text, color='black',
|
||||
size=40,
|
||||
weight=ft.FontWeight.BOLD),
|
||||
bgcolor=bgcolor,
|
||||
duration=1500)
|
||||
page.overlay.append(snack_bar)
|
||||
snack_bar.open = True
|
||||
|
|
Loading…
Reference in a new issue