build method

  1. @override
Widget build(
  1. BuildContext context
)

Builds a new WebView.

Returns a Widget tree that embeds the created web view.

Implementation

@override
Widget build(BuildContext context) {
  return PlatformViewLink(
    key: _androidParams.key,
    viewType: 'kr.co.bootpay/webview',
    surfaceFactory: (
        BuildContext context,
        PlatformViewController controller,
        ) {
      return AndroidViewSurface(
        controller: controller as AndroidViewController,
        gestureRecognizers: _androidParams.gestureRecognizers,
        hitTestBehavior: PlatformViewHitTestBehavior.opaque,
      );
    },
    onCreatePlatformView: (PlatformViewCreationParams params) {
      return _initAndroidView(
        params,
        displayWithHybridComposition:
        _androidParams.displayWithHybridComposition,
      )
        ..addOnPlatformViewCreatedListener(params.onPlatformViewCreated)
        ..create();
    },
  );
}