Skip to content

Commit

Permalink
fix: html view disposed before set state
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Feb 1, 2021
1 parent 1b19f1a commit f4e5df4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/widgets/html_view.dart
Expand Up @@ -29,9 +29,11 @@ class _HtmlViewState extends State<HtmlView> {
final value = await controller
.evaluateJavascript("document.documentElement.scrollHeight;");
// print(value);
setState(() {
height = double.parse(value);
});
if (mounted) {
setState(() {
height = double.parse(value);
});
}
}

@override
Expand Down

0 comments on commit f4e5df4

Please sign in to comment.