flet icon indicating copy to clipboard operation
flet copied to clipboard

WebView

Open FeodorFitsner opened this issue 3 years ago • 5 comments

Web, iOS, Android: https://pub.dev/packages/webviewx Windows: https://pub.dev/packages/webview_windows macOS: https://github.com/akaboshinit/flutter_inline_webview_macos

FeodorFitsner avatar Oct 03 '22 03:10 FeodorFitsner

Is WebView a way to display HTML-based plots and graphics (e.g. made with plot.ly, altair, ...), and integrate them nicely into the app layout?

clstaudt avatar Oct 03 '22 09:10 clstaudt

It can be used for that, yes.

FeodorFitsner avatar Oct 03 '22 15:10 FeodorFitsner

That's great to hear. Could we get an estimate of when to expect this feature? For my project, I need to put GUI development on hold until flet supports plotting in some way, or reconsider the GUI framework. I believe support for displaying the output of established plotting libraries would be the best option.

clstaudt avatar Oct 10 '22 09:10 clstaudt

What kind of charts are you looking the most?

FeodorFitsner avatar Oct 10 '22 18:10 FeodorFitsner

Nothing out of the ordinary: (Stacked) bar charts, line charts (time series), pie charts.... Ideally I want to reuse the charts I have already implemented with https://altair-viz.github.io in a flet app. We want to write apps in Python also because we want to use all the great data libraries.

clstaudt avatar Oct 10 '22 18:10 clstaudt

https://github.com/rodydavis/easy_web_view

ndonkoHenri avatar Nov 08 '22 12:11 ndonkoHenri

Any ETA on this item? I need to display a Privacy Policy held on our main website in the Flet App (web only, so an iFrame is all I really need). I don't have the bandwidth to help with coding, but I can help with testing.

gbrandt avatar Jan 04 '23 04:01 gbrandt

I would also suggest considering https://pub.dev/packages/flutter_widget_from_html, as it's fully cross platform, still supported and provides features such as video playback, which flet still does not support and is much more difficult to support in a fully cross-platform way (assuming this plugin is fully cross-platform with video). There is also a core version, where you can only add the features you need, such as omitting audio support, as flet already supports that.

adampiskorski avatar Feb 15 '23 14:02 adampiskorski

+1 on this feature - webview opens a lot of possibilities

iotgopher avatar May 25 '23 02:05 iotgopher

Currently my team and I are thinking about using flet to create a desktop application but my question is if it supports webview to be able to implement it in the project?

Stokerx avatar Aug 13 '23 01:08 Stokerx

@Stokerx Thanks for your interest! As you see from this issue doing WebView for Android and iOS would be a breeze, however, AFAIK there is no a unified WebView solution for desktops. What is your use case/requirements for WebView?

FeodorFitsner avatar Aug 13 '23 15:08 FeodorFitsner

@FeodorFitsner In this case it would be used to access a verification page of the government's Single Taxpayer Registry, since there is no public Api that can do that verification work, so the idea was to open that web page within the application and make the queries there.

Stokerx avatar Aug 13 '23 16:08 Stokerx

IMHO, doing that in WebView could be a challenge as you have to ensure government website works in a webview (cookies, redirect URLs, popups they might use for auth, etc.).

An easier and more "natural" approach would be opening auth website in an user-default web browser and then use localhost:<someport> (hosted in a Python app) for callback redirect and "You can now close the window" HTML response.

On Android and iOS external URL is opened in an in-app window which looks kind of nice.

FeodorFitsner avatar Aug 13 '23 16:08 FeodorFitsner

Web view is a requirement to use external chat support such as chatwoot. How hard is we view in browsers?

gbrandt avatar Aug 13 '23 16:08 gbrandt

Making "good" WebViews for desktop on macOS, Windows and Linux is potentially the same amount of work and overcoming the same challenges as done by Tauri project. I could be wrong though, but it's just a feeling.

FeodorFitsner avatar Aug 14 '23 20:08 FeodorFitsner

also hoping for this function, as I was planning to write a wrapper UI embedding another codebase/UI (communicate over API) into it.

Xynonners avatar Aug 15 '23 10:08 Xynonners

https://flet.dev/docs/controls/webview

ndonkoHenri avatar Dec 02 '23 00:12 ndonkoHenri

Hello, May I ask when the desktop and browser versions of webview will be available? I am really looking forward to its use.

icsos avatar Dec 06 '23 12:12 icsos

Web WebView should be easy. macOS would be relatively easy too. Windows is kind of limited (found this https://pub.dev/packages/desktop_webview_window) - looks like it opens a new window with webview - it cannot render the page inside Flutter app.

FeodorFitsner avatar Dec 07 '23 04:12 FeodorFitsner

i have been thinking about this issue and imo wouldn't embedding chromium do the job? it would work with both mac and older versions of windows and is much more backwards compatible. the downside is the increased file size. i found something similar to what i described here: https://pub.dev/packages/webview_cef

loafthecomputerphile avatar Feb 02 '24 23:02 loafthecomputerphile

Wondering how this control is going...

icsos avatar May 16 '24 11:05 icsos