File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
sdk/python/packages/flet-runtime/src/flet_runtime Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 3333 get_package_bin_dir ,
3434 get_package_web_dir ,
3535 get_platform ,
36+ is_embedded ,
3637 is_linux ,
3738 is_linux_server ,
3839 is_macos ,
39- is_mobile ,
4040 is_windows ,
4141 open_in_browser ,
4242 safe_tar_extractall ,
@@ -172,7 +172,7 @@ def exit_gracefully(signum, frame):
172172 or view == AppView .FLET_APP_WEB
173173 )
174174 and not is_linux_server ()
175- and not is_mobile ()
175+ and not is_embedded ()
176176 and url_prefix is None
177177 ):
178178 fvp , pid_file = open_flet_view (
@@ -261,7 +261,7 @@ def exit_gracefully(signum, frame):
261261 or view == AppView .FLET_APP_WEB
262262 )
263263 and not is_linux_server ()
264- and not is_mobile ()
264+ and not is_embedded ()
265265 and url_prefix is None
266266 ):
267267 fvp , pid_file = await open_flet_view_async (
@@ -323,7 +323,7 @@ def __connect_internal_sync(
323323 assets_dir = env_assets_dir
324324
325325 is_socket_server = server is None and (
326- is_mobile () or view == AppView .FLET_APP or view == AppView .FLET_APP_HIDDEN
326+ is_embedded () or view == AppView .FLET_APP or view == AppView .FLET_APP_HIDDEN
327327 )
328328
329329 if not is_socket_server :
@@ -410,7 +410,7 @@ async def __connect_internal_async(
410410 assets_dir = env_assets_dir
411411
412412 is_socket_server = server is None and (
413- is_mobile () or view == AppView .FLET_APP or view == AppView .FLET_APP_HIDDEN
413+ is_embedded () or view == AppView .FLET_APP or view == AppView .FLET_APP_HIDDEN
414414 )
415415 if not is_socket_server :
416416 server = __start_flet_server (
Original file line number Diff line number Diff line change 1010
1111
1212def is_ios ():
13- return os .getenv ("FLET_PLATFORM" ) == "iOS "
13+ return os .getenv ("FLET_PLATFORM" ) == "ios "
1414
1515
1616def is_android ():
17- return os .getenv ("FLET_PLATFORM" ) == "Android"
17+ return os .getenv ("FLET_PLATFORM" ) == "android"
18+
19+
20+ def is_embedded ():
21+ return os .getenv ("FLET_PLATFORM" ) is not None
1822
1923
2024def is_mobile ():
You can’t perform that action at this time.
0 commit comments