Skip to content

[QUESTION] Extended platform compatibility (desktop and web) #722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
deinspanjer opened this issue Jun 4, 2021 · 4 comments
Closed

[QUESTION] Extended platform compatibility (desktop and web) #722

deinspanjer opened this issue Jun 4, 2021 · 4 comments
Labels

Comments

@deinspanjer
Copy link

I have been evaluating various possible options for implementing a flutter application that is effectively a specialized User Agent (i.e. browser) for a specific set of websites (web published fiction sites). I am trying to model the application after a User Agent to avoid the potential issues with stealing content or spidering. I want to allow the user of my application to interact with the site for authentication and leaving feedback while still providing an enhanced view of the actual content to read.

I really like the idea of being able to use flutter_html to parse and customize the HTML I retrieve from a site, but I really want to be able to support desktop and web platforms in addition to just Android and IOS.

Do you have any thoughts on how I might accomplish this? Do you think it would be relatively straightforward to attempt to extend flutter_html into those other platforms?

A picture of a cute animal (not mandatory but encouraged)
IMG_20150712_121625

@tneotia
Copy link
Contributor

tneotia commented Jun 4, 2021

This package supports web fully and nearly supports desktop (as long as you don't use iframes)! :)

@erickok
Copy link
Contributor

erickok commented Jun 4, 2021

The other platform - especially desktop - are not quite as fleshed out though and may have some visual glitches, such as #711. At the very least the Flutter Web rendering will never look exactly like your browser would render it, simply because that is not a goal for this project (though it will be very similar or quasi the same depending on the type content).

@deinspanjer
Copy link
Author

This is exciting to hear. I am not that concerned with pixel perfect replication of how the browser would render. Since I am focusing on rendering web published fiction, there is actually a reasonably small set of tags I want to support at the start.

I might just be too new to Dart and Flutter, but I was assuming I would have trouble importing the package into my project since pub.dev reported it is only compatible with mobile. Do I need to wait until #661 is merged maybe to avoid running into platform dependency issues with unsupported features?

I will attempt to get started with using the package and see where I go. Thank you very much for answering my question.

@deinspanjer deinspanjer changed the title [QUESTION] [QUESTION] Extended platform compatibility (desktop and web) Jun 4, 2021
@tneotia
Copy link
Contributor

tneotia commented Jun 4, 2021

Do I need to wait until #661 is merged maybe to avoid running into platform dependency issues with unsupported features?

Not really, you should be fine apart from iframe support and maybe the occasional rendering glitch, but no exceptions/errors. To prevent the iframe issue you can use tagsList: Html.tags..remove("iframe") on your Html widget implementation.

@erickok erickok closed this as completed Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants