Search code examples
androidflutterdartflutter-listviewflutter-radiobutton

Flutter ListView becomes sloppy and slow when using RadioListTile or Radio buttons in each item


I am trying to implement a listview where I will show the questions of a quiz and each questions will have 4 radio buttons. But when the list gets bigger like 30-50 items the listview scroll becomes very sloppy and laggy. without radio but only text scroll works smooth. Please help me if you have faced similar issue.

I tried to use SingleChildScrollview on top of Listview but I didn't get any solutions. I think the problem is with Radio. I dont why this widget is so heavy.


Solution

  • I have removed the ListTile/RadioListTile/Radio components from my ListView children and created a radio using IconButton which made my ListView smoother. I think the default Radio made my ListItems more complex as they have their own states which may be cost expensive. I wish I could use itemExtent which makes the scroll lot faster than it is right now.