最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

flutter - flickering bar at the beginning of the scroll, at the bottom of the webviewwidget - Stack Overflow

programmeradmin6浏览0评论

At the beginning of scrolling, until the sliverappbar is minimized to its minimum size, a flickering stripe appears at the bottom of the webviewwidget (see video here) How can I fix it without replacing the NestedScrollView with a customscrollview, since you need access to the outer and inner scroll

SafeArea(
      child: Scaffold(
        body: NestedScrollView(
          //controller: controller,
            headerSliverBuilder:
                (BuildContext context, bool innerBoxIsScrolled) {
              return [
                SliverOverlapAbsorber(
                  handle: SliverOverlapAbsorberHandle(),
                  sliver: SliverSafeArea(
                      sliver: SliverAppBar(
                        stretch: true,
                        stretchTriggerOffset: 100,
                    expandedHeight: 256,
                    collapsedHeight: 56,
                    pinned: true,
                  ),
                  ),
                ),
              ];
            },
            body: CustomScrollView(
              slivers: [
                SliverToNestedScrollBoxAdapter(
                    childExtent: 1491,
                    onScrollOffsetChanged: (scrollOffset) {
                      double y = scrollOffset;
                      if (Platform.isAndroid) {
                        y *= View.of(context).devicePixelRatio;
                      }
                      webViewController.scrollTo( 0, y.ceil());

                    },
                    child:WebViewWidget(controller: webViewController,)
                ),
              ],
            ),),
      ),
    ),

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论