Container overlapping ListTile properties
Duplicate Check
- [X] I have searched the opened issues and there are no duplicates
Describe the bug
ListTile properties like hover_color or bgcolor_activated or bgcolor are overlapped by Container properties like bgcolor or shadow. It's strange because normally the ListTile properties are displayed over the Container properties. For example, the property title from the ListTile displays its content over the Container, even if it's set to the Container a background colour.
It seems that this is a behaviour of this control. If instead of the ListTile you use the control Text as argument for the content of the Container, the bgcolor property of the Text overlap the bgcolor of the Container.
Similar problem was mentioned in the issue #3426. But the solution there doen't seem to apply here, because even using the ListTile within ListView, Column, it persists with the same problem.
Code sample
Code
import flet as ft
def main(page: ft.Page):
page.add(
ft.Container(
shadow=ft.BoxShadow(color=ft.colors.GREY_200, blur_radius=5),
border=ft.Border(
top=ft.BorderSide(width=2, color=ft.colors.GREY_200),
bottom=ft.BorderSide(width=2, color=ft.colors.GREY_200),
right=ft.BorderSide(width=2, color=ft.colors.GREY_200),
left=ft.BorderSide(width=2, color=ft.colors.GREY_200),
),
border_radius=5,
content=ft.ListTile(
title=ft.Text('This is a test'),
hover_color='red',
on_click=lambda e: print('Test')
)
)
)
ft.app(target=main)
To reproduce
- Run the reprocode.
- Hover the mouse over the option with the text 'This is a test'.
Expected behavior
I expected to see the properties of the ListTile overlapping the properties of the Container.
Screenshots / Videos
Captures
[Upload media here]
Operating System
Windows
Operating system details
Windows 11 Pro
Flet version
0.24.1
Regression
No, it isn't
Suggestions
No response
Logs
Logs
[Paste your logs here]
Additional details
No response