Skip to content

Commit

Permalink
New way to get HTML (source code)
Browse files Browse the repository at this point in the history
  • Loading branch information
And96 committed Oct 31, 2021
1 parent de061db commit 3cf3b75
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,12 @@ class _HomeScreenState extends State<HomeScreen> with WidgetsBindingObserver {
}

if (choice.title == "Source Code") {
webViewController
?.getHtml()
//webViewController
//?.getHtml()
webViewController!
.evaluateJavascript(
source:
"window.document.getElementsByTagName('html')[0].outerHTML;")
.then((value) => Share.share(value.toString()));
}
}
Expand Down

0 comments on commit 3cf3b75

Please sign in to comment.