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:
Lance Edgar 2024-07-07 14:22:11 -05:00
parent f3ab4f859d
commit 8fe4c94005

View file

@ -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',
snack_bar = ft.SnackBar(ft.Text(text, color='black',
size=40,
weight=ft.FontWeight.BOLD),
bgcolor=bgcolor,
duration=1500)
page.snack_bar.open = True
page.overlay.append(snack_bar)
snack_bar.open = True