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

I hope to increase the way to get the title of the web page #30

Closed
dengsgo opened this issue Jan 29, 2018 · 3 comments
Closed

I hope to increase the way to get the title of the web page #30

dengsgo opened this issue Jan 29, 2018 · 3 comments

Comments

@dengsgo
Copy link

dengsgo commented Jan 29, 2018

I hope to increase the way to get the title of the web page. Under normal circumstances, the appbar title should display the title of the page

@lejard-h
Copy link
Collaborator

with the last version (0.1.0) you can use WebviewScaffold, onUrlChanged and evalJavascript.

flutterWebviewPlugin.onUrlChanged.listen((url) async {
   webviewTitle = await flutterWebviewPlugin.evalJavascript("window.document.title");
   setState(() => {});
});

...

new WebviewScaffold(
              url: "https://www.google.com",
              appBar: new AppBar(
                title: new Text(webviewTitle),
              ),
            );

let me know if you get any problems, either way I will close the issue

@dengsgo
Copy link
Author

dengsgo commented Feb 5, 2018

Cool, thank you for your answer.

@l-k22
Copy link

l-k22 commented Nov 9, 2018

I'm a little confused by this, I can get the webviewscaffold to work with a bottomnavigationbar when it is returned directly in my build method. However, I have made some alterations to my app so I now have a listview of flatbuttons which act as my ebook's contents page. When the user clicks a list item I'd like it to open the webview with a bottomnavigationbar so they can navigate the book and also return to the listview.
What is the correct way to do this?

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

3 participants