Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make Body Scrollable Flutter

Tags:

flutter

dart

I want my body to be scrollable with this code below i included and image of what is is now

I need help in getting this thing to work

any opinions

to get a better idea it is an e-commerce app with a carousel then below it categories and the below them the products

i need scrolling to be as if all of this is on part

how?

body: new Column(
        children: <Widget>[
          
//      ================= IMAGE CAROUSEL BEGINS HERE ==================

          new ImageCarouselUI(),

//      ================= HORIZONTAL LIST SECTION ====================

          //padding widget
          new Padding(padding: const EdgeInsets.all(6.0),
          child: Container(
            alignment: Alignment.centerLeft,
            child: new Text('Categories', style: new TextStyle(fontSize: 15.0),)),
          ),

          //Horizontal list view begins here
          HorizontalList(),

          //padding widget
          new Padding(padding: const EdgeInsets.all(10.0),
            child: new Container(
              alignment: Alignment.centerLeft,
              child: new Text('Recent products')),),

          //grid view
          new Flexible(
            child: Products()
          ),
          
        ],
      ),

Image Of What I Want It to be:

enter image description here

like image 826
Yazeed AlKhalaf Avatar asked Jan 01 '23 06:01

Yazeed AlKhalaf


1 Answers

If all your body is only one complex widget you can use use a SingleChildScrollView class.

//...
body: SingleChildScrollView ( // this will make your body scrollable
  child: Column(
   /// your parameters
   children: <Widget> [
      // your widgets,
     // your widget...
   ],
 ),
)

,

like image 72
Marcos Boaventura Avatar answered Jan 24 '23 14:01

Marcos Boaventura