flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
10.8k stars 416 forks source link

Update Flet Mobile App SDK to v0.24.1 #3096

Closed yunguangli closed 1 day ago

yunguangli commented 4 months ago

Description

I am testing the Dropdown control. The on_click event in option works properly on desktop if run like : flet run test.py -r -d ... However, there is no response on the Flet App on ios/android , if run like this : flet run test.py -r -d --ios or --android.

edited: found additional problem, bgcolor also doesn't work on Flet App. On the App, the dropdown bgcolor is always white. bgcolor works on desktop.

Code example to reproduce the issue:

import flet as ft

def main(page: ft.Page):
    def dropdown_changed(e):
        t.value = f"Dropdown changed to {e.control.data}"
        page.update()

    t = ft.Text()
    dd = ft.Dropdown(
        options=[
            ft.dropdown.Option("Red", data="Red", on_click=dropdown_changed),
            ft.dropdown.Option("Green", data="Green", on_click=dropdown_changed),
            ft.dropdown.Option("Blue", data="Blue", on_click=dropdown_changed),

        ],
        width=200,
bgcolor=ft.colors.BLUE,
    )
    page.add(dd, t)

ft.app(target=main)

Describe the results you received:

In Flet app on both ios and android, on_click and bgcolor has no response. It works, however, on desktop.

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Flet version (pip show flet):

0.22

Give your requirements.txt file (don't pip freeze, instead give direct packages):

(The requirements)

Operating system:

Flet app on ios and android

Additional environment details:

ndonkoHenri commented 4 months ago

The Flet app needs to be updated (is in process).

aurosevic commented 2 months ago

@ndonkoHenri I am also having a problem when I want to display local images on iOS, similar to the issue #3037 for Android.

File System structure:

project
  |-- assets
     |-- images
        |-- img.jpg
  |-- main.py

Code in main.py:


def main(page: ft.Page):
    page.add(ft.Image(src=f'images/img.jpg'))   # Doesn't work with: page.add(ft.Image(src=f'./images/img.jpg')) as well

ft.app(target=main, assets_dir='assets')

Images display on Desktop and Web, but doesn't on iOS. It doesn't work when setting _imgsrc for Container as well.

Flet App info: Clinet version: 1.5.1 Flet SDK version; 0.21.1 Python version: 3.11.6

pip list

Package               Version
--------------------- --------------
annotated-types       0.7.0
anyio                 4.4.0
arrow                 1.3.0
binaryornot           0.4.4
certifi               2024.6.2
chardet               5.2.0
charset-normalizer    3.3.2
click                 8.1.7
cookiecutter          2.6.0
dnspython             2.6.1
email_validator       2.1.1
exceptiongroup        1.2.1
fastapi               0.111.0
fastapi-cli           0.0.4
flet                  0.22.1
flet-core             0.22.1
flet-runtime          0.22.1
h11                   0.14.0
httpcore              1.0.5
httptools             0.6.1
httpx                 0.27.0
idna                  3.7
Jinja2                3.1.4
markdown-it-py        3.0.0
MarkupSafe            2.1.5
mdurl                 0.1.2
oauthlib              3.2.2
orjson                3.10.5
packaging             23.2
pip                   24.0
pydantic              2.7.4
pydantic_core         2.18.4
Pygments              2.18.0
pypng                 0.20220715.0
python-dateutil       2.9.0.post0
python-dotenv         1.0.1
python-multipart      0.0.9
python-slugify        8.0.4
PyYAML                6.0.1
qrcode                7.4.2
repath                0.9.0
requests              2.32.3
rich                  13.7.1
setuptools            68.2.0
shellingham           1.5.4
six                   1.16.0
sniffio               1.3.1
starlette             0.37.2
text-unidecode        1.3
typer                 0.12.3
types-python-dateutil 2.9.0.20240316
typing_extensions     4.12.2
ujson                 5.10.0
urllib3               2.2.1
uvicorn               0.30.1
uvloop                0.19.0
watchdog              4.0.1
watchfiles            0.22.0
websockets            12.0
wheel                 0.41.2
BrentHuang commented 2 months ago

Are there new flet app?

BrentHuang commented 2 months ago

img_v3_02ck_a828fc36-bef2-4065-aff4-ee483c5064dg You can add a QR code scanning button on this interface. Scan the QR code displayed by flet run --android .

Michel7GitHub commented 1 day ago

I just installed version 0.24.1 of Flet and I still get the message "Unknown control: map" on my mobile. Do you have a target date for the availability of this feature on mobiles?

ndonkoHenri commented 1 day ago

The Flet app has been updated in both stores:

They are compatible with the latest Flet version 0.24.1. Give it a try and provide feedback.

Michel7GitHub commented 1 day ago

Hi, Unfortunately, I still have the same problem. The Map still does not display and I receive the message "Unknown control: map". I updated Flet App on my 2 mobiles (iPhone & iPad) and I have the problem with both.

Le ven. 6 sept. 2024 à 10:59, TheEthicalBoy @.***> a écrit :

The Flet app has been updated in both stores:

They are compatible with the latest Flet version 0.24.1. Give it a try and provide feedback.

— Reply to this email directly, view it on GitHub https://github.com/flet-dev/flet/issues/3096#issuecomment-2334248541, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7MAAYSSDIRIRS647DKD5U3ZVG7LZAVCNFSM6AAAAABGYHAVOOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZUGI2DQNJUGE . You are receiving this because you commented.Message ID: @.***>

FeodorFitsner commented 1 day ago

Sorry about that! Apparently, Flet client doesn't include map module. Will fix it in the next update.

piidus commented 2 hours ago

please let me know which version of google api you used and any other configuration