I want this design enter image description here and almost i have made this design but the problem is with i'm unable to add scrolling in it ..if i'm not using the right approach then give me solution for this
Here's my code "
List<String> topics = [
'Need support',
'Relationship & love',
'Confession & secret',
'Inspiration & motivation',
'Food & Cooking',
'Personal Story',
'Business',
'Something I learned',
'Education & Learning',
'Books & Literature',
'Spirit & Mind',
'Travel & Adventure',
'Fashion & Style',
'Creativity & Art',
'Humor & Comedy',
'Sports & Fitness',
'Technology & Innovation',
'Current Events & News',
'Health & Wellness',
'Hobbies & Interests'
];
"
"
SizedBox(
height: 50,
child: Stack(
children:
List.generate(topics.length, (index) {
Color? color;
switch (index % 4) {
case 0:
color = Colors.yellow;
break;
case 1:
color = Colors.blue;
break;
case 2:
color = Colors.green;
break;
case 3:
color = Colors.red;
break;
}
int reversedIndex =
topics.length - index - 1;
return Positioned(
left: reversedIndex * 130.0,
child: Container(
width: 150,
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(
horizontal: 5),
decoration: BoxDecoration(
color: color,
borderRadius: const BorderRadius.only(
topRight: Radius.circular(40),
bottomRight: Radius.circular(40),
),
),
height: 50,
child: InkWell(
onTap: () {
filterPro.searchValue = '';
filterPro.setSearchingValue(
topics[reversedIndex]);
},
child: Text(
topics[reversedIndex],
style: TextStyle(
fontFamily: fontFamily,
color: whiteColor,
fontSize: 11,
),
),
),
),
);
}),
),
);
" Please check my above code and give me the solution how to make this list scrollable.