Creating a list using listView.builder

ListView.builder(
itemCount: 10,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
width: 300,
height: 200,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
color: Colors.red,
),
child: const Center(child: Icon(Icons.heart_broken_rounded,color: Colors.white,size: 150,)),
),
);

}),

Comments

Popular posts from this blog

swapping the alternate values in given array's element ! 17/11/2022

Learning stage | c++ programs

c++ basic question