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

Crashes when swiping before first or past last value #134

Open
dhust opened this issue Jul 27, 2022 · 1 comment
Open

Crashes when swiping before first or past last value #134

dhust opened this issue Jul 27, 2022 · 1 comment

Comments

@dhust
Copy link

dhust commented Jul 27, 2022

Works great if I turn infiniteLoop: true. Otherwise, it crashes if I try to swipe before the first or past the last item, but only when the axis is set to Axis.horizontal. It doesn't crash if it's set to Axis.vertical.

NumberPicker(
    value: playerPlaces[index],
    minValue: 1,
    maxValue: players.length,
    step: 1,
    onChanged: (value) {
      setState(() {
        playerPlaces[index] = value;
      });
    },
    axis: Axis.horizontal,
    itemWidth: 30,
    // infiniteLoop: true,
    
  ),

When I restart the app, this error shows:

════════ Exception caught by gesture ═══════════════════════════════════════════
'package:flutter/src/widgets/overscroll_indicator.dart': Failed assertion: line 243 pos 14: 'notification.metrics.axis == widget.axis': is not true.
package:flutter/…/widgets/overscroll_indicator.dart:243
══════════════════════════════════════════════════════════════════════
@fodienne
Copy link

fodienne commented Dec 6, 2023

Same problem here, crashes on Axis.horizontal and no infiniteLoop when going out of range

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