Angelina Petzold
Angelina Petzold

Reputation: 27

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 !

Upvotes: 1

Views: 765

Answers (2)

Vishal_VE
Vishal_VE

Reputation: 2127

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

Upvotes: 0

Hardik Mehta
Hardik Mehta

Reputation: 2425

Please add physics to inner List as NeverScrollableScrollPhysics()

Upvotes: 2

Related Questions