Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/icemanbsi/flutter_time_picker_spinner
A Flutter widget to set time with spinner instead of material time picker
https://github.com/icemanbsi/flutter_time_picker_spinner
Last synced: 3 months ago
JSON representation
A Flutter widget to set time with spinner instead of material time picker
- Host: GitHub
- URL: https://github.com/icemanbsi/flutter_time_picker_spinner
- Owner: icemanbsi
- License: other
- Created: 2019-01-26T17:12:26.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-17T19:51:56.000Z (11 months ago)
- Last Synced: 2024-08-01T19:37:53.138Z (6 months ago)
- Language: Dart
- Size: 1.37 MB
- Stars: 39
- Watchers: 5
- Forks: 69
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- my-awesome-list - flutter_time_picker_spinner
README
# flutter_time_picker_spinner
Time Picker widget with spinner instead of a material time picker.
12H format
24H format
24H format with second
Custom style
## Getting Started
This project is a starting point for a Dart
[package](https://flutter.io/developing-packages/),
a library module containing code that can be shared easily across
multiple Flutter or Dart projects.For help getting started with Flutter, view our
[online documentation](https://flutter.io/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.## Props
| props | types | defaultValues |
| :---------------------- | :-------------: | :---------------------------------------------------------------------------------------------------------------: |
| time | DateTime | Current Time [ DateTime.now() ] |
| minutesInterval | int | 1 |
| secondsInterval | int | 1 |
| is24HourMode | bool | true |
| isShowSeconds | bool | false |
| isShowSeconds | bool | false |
| highlightedTextStyle | TextStyle | false |
| normalTextStyle | TextStyle | false |
| itemHeight | double | 60.0 |
| itemWidth | double | 45.0 |
| spacing | double | 20.0 |
| alignment | AlignmentGeometry | Alignment.centerRight |
| isForce2Digits | bool | false |
| onTimeChange | TimePickerCallback | |## Usage
```dart
import 'package:flutter_time_picker_spinner/flutter_time_picker_spinner.dart';Widget widget() {
return new TimePickerSpinner(
is24HourMode: false,
normalTextStyle: TextStyle(
fontSize: 24,
color: Colors.deepOrange
),
highlightedTextStyle: TextStyle(
fontSize: 24,
color: Colors.yellow
),
spacing: 50,
itemHeight: 80,
isForce2Digits: true,
onTimeChange: (time) {
setState(() {
_dateTime = time;
});
},
);
}
```