website icon indicating copy to clipboard operation
website copied to clipboard

SnackBar example on flet.dev is wrong

Open Alexanderstaehle opened this issue 1 year ago • 3 comments

Duplicate Check

  • [x] I have searched the opened issues and there are no duplicates

Describe the bug

In the documentation of the SnackBar in the on_click method it says: page.snack_bar.open = True

While it should be: page.open(snack_bar)

Code sample

Code
[Paste your code here]

To reproduce

Use page.snack_bar.open = True instead of the correct page.open(snack_bar)

Expected behavior

No response

Screenshots / Videos

Captures

[Upload media here]

Operating System

Windows

Operating system details

Windows 11

Flet version

0.26.0

Regression

I'm not sure / I don't know

Suggestions

No response

Logs

Logs
[Paste your logs here]

Additional details

No response

Alexanderstaehle avatar Feb 04 '25 16:02 Alexanderstaehle

The page.open(snackbar) method was introduced in version 0.26.0 and I assume itz what you have if you want to use that previous method, you should rewind your version back to something like 0.25.2 and others below otherwise the docs is outdated.

HappyCoder256 avatar Feb 04 '25 20:02 HappyCoder256

Will update docs in a while. Thanks.

ndonkoHenri avatar Feb 05 '25 13:02 ndonkoHenri

https://docs.flet.dev/controls/snackbar

ndonkoHenri avatar Jan 18 '26 12:01 ndonkoHenri