GaspardMerten / date_field

Flutter DateField and DateFormField
Other
45 stars 32 forks source link

platform assertions according to platform #78

Open hallelk opened 1 month ago

hallelk commented 1 month ago

The objective of this PR is to allow using the DateTimeField without forcing both Material and Cupertino delegates. currently, the assertions in _DateTimeFieldState.build are making sure both have defined delegates even when choosing a specific pickerPlatform.

I've moved the assertions into a separate method, where each is asserted conditionally.