onDurationChanged property
Stream of changes on audio duration.
An event is going to be sent as soon as the audio duration is available (it might take a while to download or buffer it).
Implementation
Stream<Duration> get onDurationChanged => eventStream
.where((event) => event.eventType == AudioEventType.duration)
.map((event) => event.duration!);