Home > other >  SingleChildScrollView inside SingleChildScrollView - can't scroll parent
SingleChildScrollView inside SingleChildScrollView - can't scroll parent

Time:01-20

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 !

CodePudding user response:

Please add physics to inner List as NeverScrollableScrollPhysics()

CodePudding user response:

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

  •  Tags:  
  • Related