MiniPlayer constructor

MiniPlayer({
  1. Key? key,
  2. AudioInfo? audioInfo,
  3. List<AudioInfo>? audiosList,
  4. Map<String, dynamic> iconStyle = const {},
  5. Color backgroundColor = Colors.black12,
  6. Map<PlayerIcons, dynamic> customizedIcons = const {},
  7. required MethodChannelFlutterAudioPlayerPlugin audioPlayer,
  8. dynamic onPlay()?,
  9. dynamic onPause()?,
  10. dynamic onResume()?,
  11. dynamic onStop()?,
  12. dynamic onPlayNext()?,
  13. dynamic onPlayPrevious()?,
  14. dynamic onPositionChanged(
    1. int
    )?,
  15. 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',
      );