简体   繁体   中英

SingleChildScrollView inside SingleChildScrollView - can't scroll parent

I got a SingleChildScrollView looking like this:

    Widget build(BuildContext context) {
    return SingleChildScrollView(
      physics: BouncingScrollPhysics(),
      scrollDirection: Axis.vertical,
      child: Container(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            // ... some other widgets come here ...
            CommunityListView(),
          ],
        ),
      ),
    );
  }

And the CommunityListView() inside of that is another SingleChildScrollView. My Problem is, once is scroll inside of the CommunityListView(), i can't get out of it and the user is stuck in this ScrollView.

Does someone know how I can fix that? Thank you !

Please add physics to inner List as NeverScrollableScrollPhysics()

SingleChildScrollView is take height of their immediate child..If you put SingleChildScrollView in their child then he can find the proper height so put height of first SingleChildScrollView's child then you can use it well

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM