1

I'm working on a flutter blog project and when the app is started it's scrollable but after the data is loaded it is not scrollable. Here's the code that I'm using,

Widget BlogsList() {
  if (blogStream != null){
    return SingleChildScrollView(
      child: Column(
        children: [
          StreamBuilder(
            stream: blogStream!,
            builder: (context, AsyncSnapshot snapshot) {
              // if (snapshot.data==null) return CircularProgressIndicator();
              return ListView.builder(
              padding: EdgeInsets.symmetric(horizontal: 16),
              itemCount: snapshot.data.docs.length,
              shrinkWrap: true,
              itemBuilder: (context, index) {
              return BlogsTile(
                authorName: snapshot.data.docs[index]['authorName'],
                title: snapshot.data.docs[index]["title"],
                description: snapshot.data.docs[index]["desc"],
                imgUrl: snapshot.data.docs[index]["imgUrl"],              
              );
             },
           );
          },
         ),
       ],
      )
    );
  }
  else {
    return Container(
      child: CircularProgressIndicator(),
        alignment: Alignment.center,
    );
  }
}

1 Answer 1

1

Try removing the SingleChildScrollView,

...
 if (blogStream != null){
       return Column(
         children: [
           ...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.