MarcinusX / NumberPicker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

itemCount > 3 not working properly

ozkayas opened this issue · comments

I installed version numberpicker: ^2.1.1
ScreenShots below for diffferent options.
I saw similar issues closed, but can not figure out how to do it.

itemCount:3
image

itemCount:5
image

itemCount:7
image

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,
                        ),
                      ),
                    ),
                  ),
                );
              },
            )