I'm creating a flutter project. And I want to add clicklistener on items. But I don't know how to do it. Here is my ListView.separator function
ListView.separated(
itemCount: _listChat.length,
itemBuilder:
(context, index)=>Container(
child: _chatItem(_listChat[index] ),
),
separatorBuilder: (context, index)=>Divider(
color: Colors.black12,
),
),
If someone has a method, I will be glad to use it.
ListView.separated(
itemCount: _listChat.length,
itemBuilder:
(context, index)=>InkWell(onTap: () {}, child: Container(
child: _chatItem(_listChat[index] )),
),
separatorBuilder: (context, index)=>Divider(
color: Colors.black12,
),
),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With