spinner_date_time_picker 0.0.8 copy "spinner_date_time_picker: ^0.0.8" to clipboard
spinner_date_time_picker: ^0.0.8 copied to clipboard

A Flutter widget to show a spinner type date picker and return a DateTime object based on cupertino. This widget is build on CupertinoDatePicker and has a similar behavior.

This is a very simple spinner date picker, that i often use projects.

Features #

  • Set initial date time.
  • Set minimum date date.
  • Set maximum date date.
  • Set picker type. date, time or date&time.
  • Set 24h true/false.
  • Set time callback.

Getting started #

TODO: List prerequisites and provide or point to information on how to start using the package.

Usage #

You can use it to make a dialog.

showDialog(
  context: context,
  builder: (context) {
    var now = DateTime.now();
    return Dialog(
      child: SpinnerDateTimePicker(
        initialDateTime: now,
        maximumDate: now.add(Duration(days: 7)),
        minimumDate: now.subtract(Duration(days: 1)),
        mode: CupertinoDatePickerMode.dateAndTime,
        use24hFormat: true,
        didSetTime: (value) {
          log.d("did set time: $value");
        },
      ),
    );
  },
);

Additional information #

Nothing for now. Let me know if i missed anything i need to add.

7
likes
90
points
60
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter widget to show a spinner type date picker and return a DateTime object based on cupertino. This widget is build on CupertinoDatePicker and has a similar behavior.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on spinner_date_time_picker