VoiceController constructor
VoiceController({})
Creates a new VoiceController instance.
Implementation
VoiceController({
required this.audioSrc,
required this.maxDuration,
required this.isFile,
required this.onComplete,
required this.onPause,
required this.onPlaying,
this.noiseCount = 24,
this.onError,
this.randoms,
this.cacheKey,
}) {
if (randoms?.isEmpty ?? true) _setRandoms();
animController = AnimationController(
vsync: this,
upperBound: noiseWidth,
duration: maxDuration,
);
init();
_listenToRemindingTime();
_listenToPlayerState();
}