Posting notifications on ft.IconButton #2750
-
QuestionGood afternoon! how to place ft.Badge inside the ft.Icon Button, this is necessary to show the presence of notifications about the presence of unread messages. I'm trying to do this, but it doesn't work. page.appbar = ft.CupertinoAppBar( Code samplepage.appbar = ft.CupertinoAppBar(
leading=ft.IconButton(ft.icons.ASSIGNMENT_IND, icon_color="white", on_click=show_drawer),
bgcolor=ft.colors.DEEP_ORANGE_ACCENT_200,
trailing=ft.IconButton(ft.icons.DOORBELL, icon_color="white",content=ft.Badge(text="1"))) Error messageNo response ------------------------------------------------------
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
To display Badge on the IconButton you need to do the opposite: use IconButton as the content for the Badge:
|
Beta Was this translation helpful? Give feedback.
-
It's working! Thank you very much |
Beta Was this translation helpful? Give feedback.
To display Badge on the IconButton you need to do the opposite: use IconButton as the content for the Badge: