easy_web_view icon indicating copy to clipboard operation
easy_web_view copied to clipboard

When drag html to the bottom , click back buttom need click two times.

Open Panda210 opened this issue 5 years ago • 1 comments

First thanks for share .

Use easy_web_view in flutter web.

when I open the [url-page] and scroll down, then click back throw exception:[Uncaught Error: Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/pointer_binding.dart:406:12 sanitizer != null]. click again [url-page] refresh, click again back to the last page.

` import 'package:easy_web_view/easy_web_view.dart'; import 'package:flutter/material.dart'; import 'package:flutter_slife_health_web/common/constant/app_constant.dart';

class CompPdfView extends StatefulWidget { String title; String filePath;

CompPdfView({ this.title, this.filePath, });

@override _CompPdfViewState createState() => _CompPdfViewState(); }

class _CompPdfViewState extends State<CompPdfView> { @override Widget build(BuildContext context) {

return WillPopScope(
  child: Scaffold(
    appBar: AppBar(
      centerTitle: AppConstant.default_center_title,
      title: Text(widget.title),
    ),
    body: EasyWebView(
      src: widget.filePath,
      isHtml: false, // Use Html syntax
      isMarkdown: false, // Use markdown syntax
      convertToWidets: false, // Try to convert to flutter widgets
    ),
  ),
  onWillPop: requestPop,
);

}

/// 点击退出按钮 - 直接退出当前页面 Future requestPop() { print('###### 点击退出'); Navigator.pop(context); return new Future.value(false); } } `

Panda210 avatar Mar 26 '20 10:03 Panda210

That is because you have a WillPopScope wrapping it

rodydavis avatar Jul 28 '20 20:07 rodydavis