You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have creating buttons to open a new tab in the browser.
import flet
from flet import Page, TextField, Row, ElevatedButton
import webbrowser
def main(page: Page):
def add_clicked(e):
new_page = webbrowser.open_new_tab('https://google.com')
if new_page:
print(new_page)
page.add(
Row(
[
TextField(hint_text="Whats needs to be done?", width=30),
ElevatedButton("Click to open mobile browser", on_click=add_clicked)
])
)
page.update()
flet.app(port=8220, target=main, view=flet.WEB_BROWSER)
when I run in localhost it opens, but when I run it on a mobile device from the browser, it keeps opening the browser on the host and not on the client.
What is the way for it to open the browser inside android?
and is
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have creating buttons to open a new tab in the browser.
when I run in localhost it opens, but when I run it on a mobile device from the browser, it keeps opening the browser on the host and not on the client.
What is the way for it to open the browser inside android?
and is
Beta Was this translation helpful? Give feedback.
All reactions