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

Sliders on a Row break when resizing #148

Open
rodolfo-arg opened this issue Oct 13, 2024 · 1 comment
Open

Sliders on a Row break when resizing #148

rodolfo-arg opened this issue Oct 13, 2024 · 1 comment

Comments

@rodolfo-arg
Copy link

rodolfo-arg commented Oct 13, 2024

When having two expanded sliders side by side as part of a Row. After resizing the window, the slider "clicking/tapping" capability breaks and it no longer selects the correct position. Snippet:

Row(
              children: [
                Expanded(
                  child: FlutterSlider(
                    max: 500,
                    min: 0,
                    values: [value],
                    onDragging: (_, currentValue, ___) {
                      setState(() {
                        value = currentValue as double;
                      });
                    },
                  ),
                ),
                Expanded(
                  child: FlutterSlider(
                    max: 500,
                    min: 0,
                    values: [value],
                    onDragging: (_, currentValue, ___) {
                      setState(() {
                        value = currentValue as double;
                      });
                    },
                  ),
                ),
              ],
            ),

See video:

Resizing.issue.flutter_xlider.mov
@rodolfo-arg
Copy link
Author

I don't get the same behaviour with the original "Slider" widget in flutter. Have already tried wrapping in LayoutBuilder and rebuilding the page with setState after resizing, the issue is not fixed unless "Hot reloading" or restarting the app altogether.

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