0

I have a SingleChildScrollView as a child widget inside its parent SingleChildScrollView widget as in the image below, enter image description here

Currently when I scroll down the touching area in the inner scrollview, the inner scrollview scrolls down and nothing moves when it reaches the bottom.

But I want the whole screen(outer scrollview) starts scrolling when the inner scrollview reaches the bottom as below. (It doesn't matter if I have to tap again in order to scroll the outer scrollview) enter image description here

How could I achieve the behaviour ?

edit

please see my code below:

class ExampleState extends State<Example> {
   String title = "text text text text texwtxtwtwxtx wtxwtxwtwtxt";
   String description = "textexxtett t exte tx tetexxt text text text";

   @override
   Widget build(BuildContext context) {
      return Scaffold(
             body: SingleChildScrollView(
                   child: ConstrainedBox(
                          constraints: BoxConstraints(
                          minHeight: MediaQuery.of(context).size.height,
                          ),
                          child: Column(
                                 mainAxisSize: MainAxisSize.min, 
                                 children: [
                                           ConstrainedBox(
                                           constraints: BoxConstraints(
                                           minHeight: MediaQuery.of(context).size.height * 0.15,
                                           maxHeight: MediaQuery.of(context).size.height * 0.30,
              ),
                                           child: Container(
                                                  padding: EdgeInsets.fromLTRB(25, 0, 25, 25),
                                                  child: SingleChildScrollView(child: Column(
                                                         children: [
                                                     Text("$title\n"),
                                                  Text("$description")
                                                  ]))))]))));}},
Jay Jeong
  • 892
  • 2
  • 11
  • 24
  • What i'm thinking is that you can manually do it. I am unaware of an automatic way to like turn this "on" but perhaps you could detect the overscroll and then perhaps: -Disable scrolling down if that's possible -Or you can manually call on the scroll controller of the outer scroll view and scroll down but I doubt it could be perfectly synced with touch controls. If you post some demo-code or so I'd be willing to experiment around with it and perhaps come up with a code that does it! – Abbas.M Jul 06 '19 at 19:47
  • Did you find a decent solution for this? – Tom Captain-Dad Pretorius Nov 08 '19 at 17:50
  • Not really. I haven't gotten the solution, but turned out I didn't really need it – Jay Jeong Nov 09 '19 at 23:23
  • Please Provide the exact code which you are trying – Guru Prasad mohapatra May 12 '20 at 05:56
  • Did anyone find a solution to this problem? – Ankit Shah Apr 07 '21 at 15:48

0 Answers0