0

I have a SingleChildScrollView and I want to use ScrollController for it. because I want to when the scroll, Reached the top of the page, physics become NeverScrollView . I want to scroll my list and when I reached the top of the page, can scroll all pages.

and by the way, I use the tab bar for it. :

Container(
      decoration: BoxDecoration(
          border: Border(bottom: BorderSide(color: Colors.grey, width: 0.3))),
      child: TabBar(
          indicatorColor: Colors.transparent,
          labelColor: Colors.red,
          unselectedLabelColor: Colors.black,
          tabs: <Widget>[
            Tab(
              text: "list1",
            ),
            Tab(
              text: "list2",
            ),
            Tab(
              text: "list",
            ),
          ]),
    );

here is body :

Container(
          height: 2 * pageWidth,
          width: pageWidth,
          child: TabBarView(
            physics: NeverScrollableScrollPhysics(),
            children: <Widget>[
             SingleChildScrollView(
                  child: Html(
                    shrinkWrap: true,
                    data: resultEp!['Description'],
                  ),
                ),
          
              SingleChildScrollView(
                  controller: scrollBarController,
                  child: ShowCommentEpisodes(
                    podId: resultEp!['podcast']['Pod_ID'].toString(),
                    epId: resultEp!['Ep_ID'].toString(),
                  ),
              ),
              SingleChildScrollView(
                child: QueuePlaying(
                  podId: resultEp!['podcast']['Pod_ID'].toString(),
                ),
              ),
            ],
          ),
        ),

TabBarView can scroll and when reached the top, all screens can scroll.

user17838882
  • 93
  • 2
  • 14

0 Answers0