simple_predicate_time_picker 1.0.0 copy "simple_predicate_time_picker: ^1.0.0" to clipboard
simple_predicate_time_picker: ^1.0.0 copied to clipboard

A material time picker with predicate, just like in date picker.

simple_picker_widget #

This is a fork of jorgesanure-pub-dep's. Original Package is no longer maintained. Kudos To Him 👍

It is a custom showTimePicker to allow you set a selectableTimePredicate like you do in showDatePicker.

showCustomTimePicker(
    context: context,
    // It is a must if you provide selectableTimePredicate
    onFailValidation: (context) => print('Unavailable selection'),
    initialTime: TimeOfDay(hour: 2, minute: 0),
    selectableTimePredicate: (time) =>
        time.hour > 1 &&
        time.hour < 14 &&
        time.minute % 10 == 0).then((time) =>
    setState(() => selectedTime = time?.format(context)))

You can see a complete sample in example/example.dart file

0
likes
150
points
23
downloads

Publisher

verified publisheryasin-shamrat.com

Weekly Downloads

A material time picker with predicate, just like in date picker.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on simple_predicate_time_picker