farhanfadila1717 / slide_countdown

A Flutter package to create easy slide animation countdown / countup timer.
https://pub.dev/packages/slide_countdown
MIT License
59 stars 43 forks source link

`duration` is always required even when `streamDuration` is provided #36

Closed spydon closed 1 year ago

spydon commented 1 year ago

It would be good if duration was not added as required so that one could add a streamDuration without having to add the duration argument. Instead an assert could be used in the constructor that checks so that one of them is provided, something like this:

assert(
  duration != null ^ streamDuration != null,
  'Either duration or streamDuration has to be provided',
)

I could send a PR for this if you want.