MethodChannelWebViewPlatform constructor

MethodChannelWebViewPlatform(
  1. int id,
  2. WebViewPlatformCallbacksHandler _platformCallbacksHandler,
  3. JavascriptChannelRegistry _javascriptChannelRegistry
)

Constructs an instance that will listen for webviews broadcasting to the given id, using the given WebViewPlatformCallbacksHandler.

Implementation

MethodChannelWebViewPlatform(
  int id,
  this._platformCallbacksHandler,
  this._javascriptChannelRegistry,
)   : assert(_platformCallbacksHandler != null),
      _channel = MethodChannel('plugins.flutter.io/webview_$id') {
  _channel.setMethodCallHandler(_onMethodCall);
}