handle method

  1. @override
Future<WebResourceResponse?> handle(
  1. String path
)
override

Handles the requested URL by returning the appropriate response.

Returning a null value means that the handler decided not to handle this path. In this case, WebViewAssetLoader will try the next handler registered on this path or pass to WebView that will fall back to network to try to resolve the URL.

However, if the handler wants to save unnecessary processing either by another handler or by falling back to network, in cases like a file cannot be found, it may return a WebResourceResponse(data: null) which is received as an HTTP response with status code 404 and no body.

Implementation

@override
Future<WebResourceResponse?> handle(String path) async {
  return null;
}