Chris1234567899 / flutter_time_range_picker

A time range picker for Flutter
MIT License
33 stars 53 forks source link

Cancel button gives null safety error #22

Closed suthura closed 3 years ago

suthura commented 3 years ago

When I click the cancel button it gives

type 'Null' is not a subtype of type 'TimeRange'

error. I went through the plugin code and found that your cancel method is also requesting TimeRange

image

Please check this out and waiting for a update. Thank you.

Chris1234567899 commented 3 years ago

Sorry, I cannot reproduce your error.

The resulting TimeRange can of course be null (if the user presses cancel) or goes back via the back button etc.

Just call it like:

TimeRange? result = await showTimeRangePicker(
       context: context,
);
suthura commented 3 years ago

fixed thank you for the support