I am creating a blogging app with blogs. I am using singlechildscrollview to implement scroll feature. But Scroll is not working. But there is no render overflow error.
This widget is useful when you have a single box that will normally be entirely visible, for example a clock face in a time picker, but you need to make sure it can be scrolled if the container gets too small in one axis (the scroll direction).
body: SingleChildScrollView(
child: Container(
child: Column(
children: <Widget>[
SizedBox(height: 12),
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
padding: const EdgeInsets.all(8),
itemCount: blogs.length,
itemBuilder: (BuildContext context, int index) {
return Container(
child: SingleChildScrollView(
child: Center(
child: Column(
children: <Widget>[
Container(
height: 350,
width: double.infinity,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: <Color>[
Colors.orange,
Colors.red,
],
),
borderRadius: BorderRadius.circular(20),
),
child: FlatButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => BlogExpanded(
title: blogs[index].title,
content: blogs[index].content,
pic1: Image.asset('hoilogo.png'),
pic2: Image.asset('hoilogo.png'),
),
),
);
},
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Text(
blogs[index].title,
textAlign: TextAlign.center,
style: kTitleHeadingBlogCard,
),
SizedBox(height: 30),
Image.asset('assets/images/hoilogo.png'),
],
),
),
),
),
SizedBox(height: 20),
],
),
),
),
);
},
),
],
),
),
),
I even tried to add container but it doesn't scroll