duration_spinbox

Creator: coderz1093

Last updated:

0 purchases

duration_spinbox Image
duration_spinbox Images

Languages

Categories

Add to Cart

Description:

duration spinbox

Duration Spinbox #



A duration widget for Flutter, heavily inspired by flutter_spinbox
Installation 💻 #
❗ In order to start using Duration Spinbox you must have the Flutter SDK installed on your machine.
Install via flutter pub add:
dart pub add duration_spinbox
copied to clipboard
or just add this line to your pubspec.yaml
duration_spinbox: ^0.1.0
copied to clipboard
Usage #
Currently this only shows the Duration in the format mm:ss, more customization
options to come in the future.
The only required parameter is value which is the initial/current duration.
DurationSpinbox(
value: Duration(minutes: 1),
),
copied to clipboard
This is designed to work similar to DropDownButton where you have to update
the value when changed. Like this:
var _duration = Duration(minutes: 1);

...

DurationSpinbox(
value: _duration,
onChanged: (value){
setState((){
_duration = value;
});
},
),
copied to clipboard
You can set a minimum and maximum value. By default minimum is Duration.zero
but max is by default null.
DurationSpinbox(
value: Duration(minutes: 1),
min: Duration(minutes: 1),
max: Duration(minutes: 5),
),
copied to clipboard
You can set the stepValue which is the Duration the value will be increased
or decreased. By default it is Duration(minutes: 1).
DurationSpinbox(
value: Duration.zero,
stepValue: Duration(minutes: 5),
),
copied to clipboard
By default min is equal to Duration.zero, to allow negative values you have to
set min to null manually.
DurationSpinbox(
value: Duration(minutes: 0),
min: null,
),
copied to clipboard
What's next #

Formatting options
Editing options
Customization options

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.