Home:ALL Converter>How to make the entire page in flutter scrollable

How to make the entire page in flutter scrollable

Ask Time:2021-12-01T06:15:48         Author:BradG

Json Formatter

I want to make the entire page in flutter scrollable, while the height in each element inside remains dynamic. Now the two Expanded elements have fixed height and are vertically scrollable - I want to make them extend to their regular height and be able to scroll down to the next element.

body: Scaffold(
    body: Column(
      children: <Widget>[
        Text(),
        IntrinsicHeight(   //This is fixed height and doesn't move
          child: Text(),
        ),
        new Divider(height: 0.1),
        Text(),
        Expanded(          //This is now vertically scrollable in its own box
            child: Text()
        ),
        Expanded(          //This is now vertically scrollable in its own box
            child: Text()
        ),
      ],
    ),
  ),

I tired several versions of wrapping the first column in SingleChildScrollView but for some reason it doesn't work.

Author:BradG,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/70176813/how-to-make-the-entire-page-in-flutter-scrollable
Ravindra S. Patil :

Try below code hope its helpful to you. Wrap your Column() inside IntrinsicHeight() widget,\nRefere IntrinsicHeight here\nRefere SingleChildScrollView here, this widget is used for Scrolling the Widget..\nreturn Scaffold(\n body: SingleChildScrollView(\n child: IntrinsicHeight(\n child: Column(\n children: <Widget>[\n Text(\n 'Try',\n ),\n IntrinsicHeight(\n child: Text(\n 'Done',\n ),\n ),\n new Divider(height: 0.1),\n Text(\n 'data',\n ),\n Expanded(\n child: Text(\n 'Okk',\n ),\n ),\n Expanded(\n child: Text(\n 'Yes',\n ),\n ),\n ],\n ),\n ),\n ),\n);\n",
2021-12-01T05:18:12
LearnFlutter :

Wrap your column with a SingleChildScrollView(), so select Column than wrap it with a widget witch is SingleChildScrollView()",
2021-11-30T23:28:26
yy