flet icon indicating copy to clipboard operation
flet copied to clipboard

Setting an empty page theme changes Android status bar

Open mfxbe opened this issue 1 year ago • 0 comments

Duplicate Check

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

Describe the bug

When using page.theme = ft.Theme(...) to change something (completely different and not relevant for the issue) I noticed that the Android status bar text and icon color change to black even when the theme object has no custom set properties.

See images. I would expect that just setting the empty theming option should not change anything.

Code sample

Code

Example 1 (without Theme):

import flet as ft

def main(page: ft.Page):
    page.title = "Example"
    
    page.appbar = ft.AppBar(bgcolor="blue")
    page.add(ft.Text("Example"))

ft.app(main)

Example 2 (with Theme):

import flet as ft

def main(page: ft.Page):
    page.title = "Example"
    
    page.theme = ft.Theme()
    
    page.appbar = ft.AppBar(bgcolor="blue")
    page.add(ft.Text("Example"))

ft.app(main)

To reproduce

Run the 2 examples on an Android device.

e.g. with flet run --android

Expected behavior

Both examples should lead to the same style.

Screenshots / Videos

Captures

Example 1 (without Theme):

Screenshot_20241009-233845_Flet

Example 2 (with Theme):

Screenshot_20241009-233821_Flet

Operating System

Linux

Operating system details

Debian 12 / Issue on Andoid

Flet version

0.24.1

Regression

I'm not sure / I don't know

Suggestions

No response

Logs


Additional details

Furthermore I'm also unable to set status_bar_brightness / status_bar_icon_brightness manually when using ft.theme.Theme but this might also be an issue on my side (have to look further into it).

mfxbe avatar Oct 09 '24 21:10 mfxbe