MiniPlayer constructor
MiniPlayer({
- Key? key,
- AudioInfo? audioInfo,
- List<
AudioInfo> ? audiosList, - Map<
String, dynamic> iconStyle = const {}, - Color backgroundColor = Colors.black12,
- Map<
PlayerIcons, dynamic> customizedIcons = const {}, - required MethodChannelFlutterAudioPlayerPlugin audioPlayer,
- dynamic onPlay()?,
- dynamic onPause()?,
- dynamic onResume()?,
- dynamic onStop()?,
- dynamic onPlayNext()?,
- dynamic onPlayPrevious()?,
- dynamic onPositionChanged()?,
- dynamic onCompletion()?,
Implementation
MiniPlayer({
super.key,
this.audioInfo,
this.audiosList,
this.iconStyle = const {},
this.backgroundColor = Colors.black12,
this.customizedIcons = const {},
required this.audioPlayer,
this.onPlay,
this.onPause,
this.onResume,
this.onStop,
this.onPlayNext,
this.onPlayPrevious,
this.onPositionChanged,
this.onCompletion,
}) : assert(
(audioInfo != null && audioInfo.audioUrl != null) ||
(audiosList != null && audiosList.isNotEmpty),
'Either audioInfo or audiosList must be provided',
);