I have a Column that has two container
First Container has 3 chips [ 'All','Expenses','Income'], and second container having listview builder which shows data,
here I want to disable first container of chips while long press on list view's item, so that user can not tap on any chip..
in my following coding I have placed Container() to hide chip widgets..but here I want to show chips with disable mode...
Widget typeselection(){
return islongpressed==true?Container():Container(
child: Row(
children: List<Widget>.generate(
3,
(int index) {
return Row(children: [
ChoiceChip(
label: Container(
child: Text(_types[index]),
padding: EdgeInsets.symmetric(horizontal: 20),
),
selected: _value == index,
onSelected: (bool selected) {
setState(() {
_value = selected ? index : 0;
});
},
backgroundColor: Colors.blue.shade50,
//padding: EdgeInsets.all(0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
selectedColor: Colors.blue.shade100,
padding: EdgeInsets.all(0),
),
SizedBox(width: 10,),
],);
},
).toList(),
),
);
}