updated example!

This commit is contained in:
Lorenzo Pichilli 2022-10-08 14:21:10 +02:00
parent f5a048cb69
commit 3f8b1591c8
1 changed files with 0 additions and 36 deletions

View File

@ -26,7 +26,6 @@ class _InAppWebViewExampleScreenState extends State<InAppWebViewExampleScreen> {
);
PullToRefreshController? pullToRefreshController;
FindInteractionController? findInteractionController;
late ContextMenu contextMenu;
String url = "";
@ -82,14 +81,6 @@ class _InAppWebViewExampleScreenState extends State<InAppWebViewExampleScreen> {
}
},
);
findInteractionController = kIsWeb
? null
: FindInteractionController(
onFindResultReceived: (controller, activeMatchOrdinal, numberOfMatches, isDoneCounting) => {
print("$activeMatchOrdinal $numberOfMatches $isDoneCounting")
},
);
}
@override
@ -133,7 +124,6 @@ class _InAppWebViewExampleScreenState extends State<InAppWebViewExampleScreen> {
initialSettings: settings,
// contextMenu: contextMenu,
pullToRefreshController: pullToRefreshController,
findInteractionController: findInteractionController,
onWebViewCreated: (controller) async {
webViewController = controller;
},
@ -179,32 +169,6 @@ class _InAppWebViewExampleScreenState extends State<InAppWebViewExampleScreen> {
this.url = url.toString();
urlController.text = this.url;
});
await findInteractionController?.findAllAsync(find: "video");
// print(await findInteractionController?.getActiveFindSession());
await Future.delayed(Duration(seconds: 1));
findInteractionController?.findNext(forward: true);
findInteractionController?.findNext(forward: true);
findInteractionController?.findNext(forward: true);
await Future.delayed(Duration(seconds: 1));
// findInteractionController?.clearMatches();
findInteractionController?.findNext(forward: true);
findInteractionController?.findNext(forward: true);
findInteractionController?.findNext(forward: true);
findInteractionController?.findNext(forward: true);
await Future.delayed(Duration(seconds: 1));
findInteractionController?.clearMatches();
// print(await findInteractionController?.getSearchText());
// findInteractionController?.findNext(forward: true);
// findInteractionController?.findNext(forward: false);
// findInteractionController?.setSearchText("text");
// print(await findInteractionController?.getSearchText());
// print(await findInteractionController?.isFindNavigatorVisible());
// findInteractionController?.updateResultCount();
// findInteractionController?.clearMatches();
// findInteractionController?.presentFindNavigator();
// await Future.delayed(Duration(milliseconds: 500));
// findInteractionController?.dismissFindNavigator();
// print(await findInteractionController?.isFindNavigatorVisible());
},
onReceivedError: (controller, request, error) {
pullToRefreshController?.endRefreshing();