AudioPlayerWidget constructor
const
AudioPlayerWidget({
- Key? key,
- VoiceNotePlayerController? controller,
- bool autoLoad = true,
- bool autoPlay = false,
- TextDirection textDirection = TextDirection.ltr,
- required String? audioPath,
- AudioType audioType = AudioType.directFile,
- List<
double> ? audioSpeeds, - double size = 56,
- double width = 400,
- Color backgroundColor = Colors.blueAccent,
- Color iconColor = Colors.white,
- TextStyle? timerTextStyle,
- PlayIconShapeType shapeType = PlayIconShapeType.circular,
- PlayerStyle playerStyle = PlayerStyle.style1,
- double progressBarHeight = 3.0,
- Color progressBarColor = Colors.blueAccent,
- Color progressBarBackgroundColor = Colors.grey,
- bool showProgressBar = true,
- bool showTimer = true,
- bool showSpeedControl = true,
- dynamic onError(
- String message
- dynamic onPause()?,
- dynamic onPlay(
- bool isPlaying
- dynamic onSeek(
- double value
- dynamic onSpeedChange(
- double speed
Creates a new instance of the AudioPlayerWidget widget.
Implementation
const AudioPlayerWidget({
super.key,
this.controller,
this.autoLoad = true,
this.autoPlay = false,
this.textDirection = TextDirection.ltr,
required this.audioPath,
this.audioType = AudioType.directFile,
this.audioSpeeds,
this.size = 56,
this.width = 400,
this.backgroundColor = Colors.blueAccent,
this.iconColor = Colors.white,
this.timerTextStyle,
this.shapeType = PlayIconShapeType.circular,
this.playerStyle = PlayerStyle.style1,
this.progressBarHeight = 3.0,
this.progressBarColor = Colors.blueAccent,
this.progressBarBackgroundColor = Colors.grey,
this.showProgressBar = true,
this.showTimer = true,
this.showSpeedControl = true,
this.onError,
this.onPause,
this.onPlay,
this.onSeek,
this.onSpeedChange,
});