Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

itemCount > 3 not working properly #122

Open
ozkayas opened this issue Jul 31, 2021 · 1 comment
Open

itemCount > 3 not working properly #122

ozkayas opened this issue Jul 31, 2021 · 1 comment

Comments

@ozkayas
Copy link

ozkayas commented Jul 31, 2021

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

@ollyde
Copy link

ollyde commented Aug 16, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants