I want to add an auto scrolling system in flutter ListWheelScrollView.useDelegate for few seconds. My ListWheelChildLoopingListDelegate is generating a loop of infinity widgets.
Is it possible to scroll this loop for few seconds by clicking on a button?
My Code is here:
return Container(
height: 125,
width: ScreenSize.width * 0.3,
child: ListWheelScrollView.useDelegate(
diameterRatio: 1,
squeeze: 1.8,
itemExtent: 75,
physics: FixedExtentScrollPhysics(),
onSelectedItemChanged: (index) => print(index),
childDelegate: ListWheelChildLoopingListDelegate(
children: List<Widget>.generate(
slotNames.length,
(index) => Padding(
padding: const EdgeInsets.all(3.0),
child: Container(
decoration: BoxDecoration(
border: Border.all(
color: Colors.blue,
),
borderRadius: BorderRadius.circular(10.0),
),
child: Image.asset(
"assets/$index.png",
width: double.infinity,
height: double.infinity,
),
),
),
),
),
),
);