time_picker_spinner 1.0.2 copy "time_picker_spinner: ^1.0.2" to clipboard
time_picker_spinner: ^1.0.2 copied to clipboard

Time Picker with spinner instead of a default material time picker. This widget works with 12 or 24 hour format and custom interval mode, and this package allow localization ar and en.

time_picker_spinner #

Time Picker with spinner instead of a default material time picker. This widget works with 12 or 24 hour format and custom interval mode, and this package allow localization ar and en.

Pub Version

Demo gif #

image

Installation #

  1. Add this to your package's pubspec.yaml file:
dependencies:
  time_picker_spinner: any
copied to clipboard
  1. Get the package using your IDE's GUI or via command line with
$ pub get
copied to clipboard
  1. Import the time_picker_spinner.dart file in your app
import 'package:time_picker_spinner/time_picker_spinner.dart';
copied to clipboard

Features #

  • This widget works with 12.
  • This widget works with 24.
  • allow localization ar and en.

Usage #

EN #

en short en long

image | image

TimePickerSpinner(
              locale: const Locale('en', ''),
              time: dateTime,
              is24HourMode: false,
              isShowSeconds: true,
              itemHeight: 80,
              normalTextStyle: const TextStyle(
                fontSize: 24,
              ),
              highlightedTextStyle:
                  const TextStyle(fontSize: 24, color: Colors.blue),
              isForce2Digits: true,
              onTimeChange: (time) {
                setState(() {
                  dateTime = time;
                });
              },
            )
copied to clipboard

Ar #

ar short ar long

image | image

TimePickerSpinner(
              locale: const Locale('ar', ''),
              time: dateTime,
              is24HourMode: false,
              isShowSeconds: true,
              itemHeight: 80,
              normalTextStyle: const TextStyle(
                fontSize: 24,
              ),
              highlightedTextStyle:
                  const TextStyle(fontSize: 24, color: Colors.blue),
              isForce2Digits: true,
              onTimeChange: (time) {
                setState(() {
                  dateTime = time;
                });
              },
            )
copied to clipboard

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
locale bool en
5
likes
140
points
1.75k
downloads

Publisher

verified publishermohamed-abdo.com

Weekly Downloads

2024.07.10 - 2025.01.22

Time Picker with spinner instead of a default material time picker. This widget works with 12 or 24 hour format and custom interval mode, and this package allow localization ar and en.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on time_picker_spinner