• Stars
    star
    301
  • Rank 135,278 (Top 3 %)
  • Language
    Dart
  • License
    BSD 2-Clause "Sim...
  • Created almost 7 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

NumberPicker Build Status Coverage Status

NumberPicker is a custom widget designed for choosing an integer or decimal number by scrolling spinners.

ezgif com-gif-maker

Example:

(See example for more)

class _IntegerExample extends StatefulWidget {
  @override
  __IntegerExampleState createState() => __IntegerExampleState();
}

class __IntegerExampleState extends State<_IntegerExample> {
  int _currentValue = 3;

  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        NumberPicker(
          value: _currentValue,
          minValue: 0,
          maxValue: 100,
          onChanged: (value) => setState(() => _currentValue = value),
        ),
        Text('Current value: $_currentValue'),
      ],
    );
  }
}