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

Widget bounds are not correctly defined/sized #86

Open
dzsonni opened this issue Sep 25, 2024 · 0 comments
Open

Widget bounds are not correctly defined/sized #86

dzsonni opened this issue Sep 25, 2024 · 0 comments

Comments

@dzsonni
Copy link

dzsonni commented Sep 25, 2024

image
When centering the SmoothIndicator it takes the widget beginning as the center instead of correctly taking half the widgets size as centerpoint. The indicators also go out of bounds.

When animating it is fine to go out of bounds but we should have proper alignment in default states.

Never mind, I misunderstood the required size parameter. Wouldn't giving the dots size and calculating from count makes more sense?

ColoredBox(
                  color: Colors.red,
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.stretch,
                    mainAxisSize: MainAxisSize.min,
                    children: [
                      Center(
                        child: SmoothIndicator(
                          offset: 1,
                          count: 5,
                          size: Size(
                            8,
                            8,
                          ),
                        ),
                      ),
                      const SizedBox(
                        height: 36,
                      ),
                    ],
                  ),
                ),
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

1 participant