how to scroll outer scrollview when inner scrollvi

2019-08-27 19:42发布

问题:

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

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)

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")
                                                  ]))))]))));}},