itemCount > 3 not working properly
ozkayas opened this issue · 1 comments
ozkayas commented
ollyde commented
@ozkayas the package is kinda pointless. You can do the same with a generic page builder with far more control and less bugs. As a note don't use simple packages like this.
PageView.builder(
itemCount: 20,
controller: PageController(viewportFraction: 0.2),
onPageChanged: (int index) => setState(() => _numberOfPeople = index),
itemBuilder: (_, i) {
return Transform.scale(
scale: i == _numberOfPeople ? 1 : 0.7,
child: Container(
width: 80,
height: 80,
child: Center(
child: Text(
(i + 1).toString(),
style: TextStyle(
fontSize: 26,
fontWeight: FontWeight.bold,
color: i == _numberOfPeople ? getColors().primary : getColors().darkFont,
),
),
),
),
);
},
)