unit_number_input 0.1.1
unit_number_input: ^0.1.1 copied to clipboard
A Flutter package for minutes/seconds input with validation, input decoration, and conversion to total seconds.
unit_number_input #
A Flutter package for entering minutes and seconds with built-in validation, auto-conversion to total seconds, and input decoration. Originally created for OpenHIIT. Currently only handles minutes and seconds, could be expanded for other values.
Table of Contents #
Installation #
Add unit_number_input to your pubspec.yaml file:
dependencies:
flutter:
sdk: flutter
unit_number_input: ^0.1.0
Basic Usage #
- Define a controller:
final UnitNumberInputController _controller = UnitNumberInputController();
- Create a
UnitNumberInputwidget and pass the controller:
UnitNumberInput(
controller: _controller,
onChanged: (seconds) {
print("Total seconds: $seconds");
},
),
Example Usage #
Check out the example directory in this repository for a complete example of how to use unit_number_input in a Flutter app.
Contributing #
View the contributing documentation. If contributing code changes, please checkout the testing documentation.
Code of Conduct #
When contributing, please keep the Code of Conduct in mind.
License #
unit_number_input is open-source software released under the MIT License. You are free to modify and distribute the application under the terms of this license. See the LICENSE file for more information.
Please note that this README file is subject to change as the application evolves. Refer to the latest version of this file in the repository for the most up-to-date information.