Skip to content

Add min/max to IntControl #38

@passsy

Description

@passsy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions