list scroll with column flutter code example

Example 1: scroll column with listview

SingleChildScrollView(
        physics: ScrollPhysics(),
        child: Column(
          children: <Widget>[
             Text('Hey'),
             ListView.builder(
                physics: NeverScrollableScrollPhysics(),
                shrinkWrap: true,
                itemCount:18,
                itemBuilder: (context,index){
                  return  Text('Some text');
                })
          ],
        ),
      ),

Example 2: make scaffold scrollable flutter


 Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(
      title: Text('News'),
    ),
    body: SingleChildScrollView(  // <-- wrap this around
      child: Column(
        children: <Widget>[
        ],
      ),
    ));
  }

Tags:

Dart Example