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',
)
It would be good if
duration
was not added asrequired
so that one could add astreamDuration
without having to add theduration
argument. Instead an assert could be used in the constructor that checks so that one of them is provided, something like this:I could send a PR for this if you want.