0

在 Android 和 iOS 上,我使用插件 InAppWebView 打开页面,当我单击日历等输入时,它会被软键盘隐藏。当我关闭键盘时,我无法向下滚动查看所有日历

return Stack(
      children: <Widget>[
        progress < 1.0
            ? const Center(
                child: CircularProgressIndicator(
                  color: AppTheme.mainColorCircularProgressIndicator,
                ),
              )
            : const SizedBox.shrink(),
          child: InAppWebView(
            initialUrlRequest: URLRequest(url: Uri.parse(widget.url)),
            gestureRecognizers: Set()
              ..add(
                Factory<VerticalDragGestureRecognizer>(
                        () => VerticalDragGestureRecognizer()),
              ),
            initialOptions: InAppWebViewGroupOptions(
              crossPlatform: InAppWebViewOptions(
                useShouldOverrideUrlLoading: true,
                useOnDownloadStart: true,
                javaScriptEnabled: true,
                javaScriptCanOpenWindowsAutomatically: true,
                userAgent: _userAgentBrowser,
              ),
              android: AndroidInAppWebViewOptions(
                allowContentAccess: true,
                builtInZoomControls: true,
                thirdPartyCookiesEnabled: true,
                useHybridComposition: true,
                allowFileAccess: true,
                supportMultipleWindows: true,
                domStorageEnabled: true,
                databaseEnabled: true,
              ),
            ),
            shouldOverrideUrlLoading: (InAppWebViewController controller,
                NavigationAction navigationAction) async {},
            onProgressChanged: (InAppWebViewController controller, int progress) {
              setState(() => this.progress = progress / 100);
            },
          ),
        ),
      ],
    );
4

0 回答 0