attachWebInterface method

  1. @override
Future<void> attachWebInterface(
  1. int webViewIdentifier,
  2. void onCloseRequested()?
)
override

Hands the native WebView identified by webViewIdentifier to the native SDK's own FanmeterWebInterface, which installs the window.FanmeterBridge bridge on it. onCloseRequested is invoked when the web layer calls closeWebView().

Implementation

@override
Future<void> attachWebInterface(int webViewIdentifier, void Function()? onCloseRequested) async {
    _onCloseRequested = onCloseRequested;
    await methodChannel.invokeMethod<void>(
        'attachWebInterface', {'webViewIdentifier': webViewIdentifier}
    );
}