GaspardMerten / date_field

Flutter DateField and DateFormField
Other
46 stars 32 forks source link

Overrideable Picker Definitions #26

Closed axrs closed 2 years ago

axrs commented 2 years ago

I love the flexibility of this input field but needed to take it a smidge further. I have a business requirement where I need to restricts the date and time input ranges, and even specify the minute increments.

To achieve this, I need to tweak the core implementation of showMaterialTimePicker. But to that point, I still want to leverage everything date_field has to offer.

Buy using the new Constructor Tear-offs, and making the showCuppertino... and showMaterial... pickers override-able methods, I can create Child classes that tweak the pickers before show to meet my requirements.

GaspardMerten commented 2 years ago

Hello, thank you for this very qualitative pull request.

Just on a side note, please do not change the package's homepage!

axrs commented 2 years ago

Thanks!

Not sure what you mean by

Just on a side note, please do not change the package's homepage!

I assume you are referring to the README.md change.

If I think of more I'll be sure to create more PRs

GaspardMerten commented 2 years ago

I was referring to the homepage in the pubspec.yaml file !

axrs commented 2 years ago

Ahh, yes! I'm sorry, I didn't even notice that.

Thanks again :)