Skip to content
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

Is it possible to serve a html file stored locally on the users phone? #52

Closed
atreeon opened this issue Mar 27, 2018 · 3 comments
Closed

Comments

@atreeon
Copy link

atreeon commented Mar 27, 2018

Serve html from the user's assets folder for instance?

Possibly related to this #23.

@zoechi
Copy link

zoechi commented Mar 27, 2018

Looks like #23 to me. Don't the suggestions work for you?

@atreeon
Copy link
Author

atreeon commented Mar 28, 2018

I'm assessing Flutter and some plugins for the needs of a yet to be created app. I will try it out today or tomorrow depending on where I get to and feedback :-)

@atreeon
Copy link
Author

atreeon commented Mar 29, 2018

Yup, it works fine, just use the new Uri.dataFromBytes

    final flutterWebviewPlugin = new FlutterWebviewPlugin();
    flutterWebviewPlugin.launch(
        new Uri.dataFromBytes(myBytes, mimeType: 'text/html').toString(),
        rect: new Rect.fromLTWH(
            0.0, 0.0, MediaQuery.of(context).size.width, 300.0),
        userAgent: kAndroidUserAgent);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants