[Question] in the navigation bar i want to have custom icons is there any way to do that (svg format) #1893
-
QuestionMy app requires custom designed icon is there any way to do its in svg format please help!!! Code sampleimport flet as ft
def main(page: ft.Page):
page.title = "NavigationBar Example"
page.navigation_bar = ft.NavigationBar(
bgcolor=ft.colors.with_opacity(0.0, '#F5F5F5'),
destinations=[
ft.NavigationDestination(icon=ft.icons.HOME_OUTLINED,selected_icon=ft.icons.HOME_ROUNDED,
label="Home"),
ft.NavigationDestination(icon=ft.icons.COMMUTE, label="Commute"),
ft.NavigationDestination(
icon=ft.icons.ACCOUNT_CIRCLE_OUTLINED,
selected_icon=ft.icons.ACCOUNT_CIRCLE_ROUNDED,
label="Account",
),
]
)
page.add(ft.Text("Body!"))
ft.app(target=main, view=ft.WEB_BROWSER) Error messageNo response ------------------------------------------------------
|
Beta Was this translation helpful? Give feedback.
Answered by
ingdesarr1
Oct 6, 2023
Replies: 1 comment 2 replies
-
I can put a image, using the command icon_content, not icon. Maybe you can try, because you can use svg files, but not calling external, you have to copy the svg information inside. Chek this link, maybe help you https://github.com/flet-dev/examples/blob/main/python/controls/image/svg-image.py |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
plugeit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can put a image, using the command icon_content, not icon. Maybe you can try, because you can use svg files, but not calling external, you have to copy the svg information inside. Chek this link, maybe help you
https://github.com/flet-dev/examples/blob/main/python/controls/image/svg-image.py