skip to Main Content
body: (
          SafeArea(
           child: SingleChildScrollView(
             child: Column(
               children: [
                 ListView.builder(
                   itemBuilder: (context,index)
                   {
                     return(
                         Container(
                           height: 100,
                           width: 100,
                           color: Colors.red,
                         )
                     );
                   },
                   itemCount: 20,
                 ),
               ],
             )
           ),
          )
      ),

I want to make it scrollable list of items basically trying to copy the ui of instagram

2

Answers


  1. Since the ListView.builder already includes scrolling you don’t need to use the SingleChildScrollView, do you have any specific requirements to use both of them? If so you could try wrapping the ListView into a SizedBox and specify a fixed height.

    Login or Signup to reply.
  2. Just try to set shrinkWrap: true inside ListView

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search