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

Add min/max to IntControl #38

Open
passsy opened this issue Jul 19, 2024 · 0 comments
Open

Add min/max to IntControl #38

passsy opened this issue Jul 19, 2024 · 0 comments

Comments

@passsy
Copy link
Collaborator

passsy commented Jul 19, 2024

I'd love to set min and max values to clamp the values. I'm currently running into issues when I create a duration.

  late final duration = IntControl(
    initialValue: initialWidget.duration.inMilliseconds,
    label: 'duration',
	min: 100, // <-- missing
  );

I use it later in an AnimationController but it doesn't allow values <=0

The following assertion was thrown building ListenableBuilder(listenable: Listenable.merge([DoubleControlNullable#028b4(null), DoubleControlNullable#013f3(1.6), IntControl#1a4de(0), ColorControl#68e46(Color(0xffffffff)), ValueNotifier<Key>#f164d([#e6e9d])]), state: _AnimatedState#b954d):
'package:flutter/src/animation/animation_controller.dart': Failed assertion: line 923 pos 12: '_periodInSeconds > 0.0': is not true.
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